Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microbit v2 specific features #763

Merged
merged 57 commits into from
Aug 20, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
2138b49
Incompatible image detection feature
gerargz May 20, 2020
a12b073
Fat binaries feature
gerargz May 20, 2020
57b5131
Interface main task changes
gerargz May 20, 2020
a6b95c8
Add microbit specific features
gerargz May 21, 2020
fb73881
Sync latest features including:
gerargz Aug 21, 2020
1e096f6
Add Power LED sleep state ON/OFF support in I2C comms interface
gerargz Aug 22, 2020
26542ef
Fix FlexIO clock ranges in assert
gerargz Aug 26, 2020
e4ce4df
#80 Add incompatible image detection feature in details.txt file. Add…
gerargz Sep 1, 2020
746d873
Validate allowed filename extensions in the I2C Flash interface (.bin…
gerargz Sep 1, 2020
d5f8ef2
Update power handling for off/stand-by modes
gerargz Sep 3, 2020
41a5bef
#33 Update error app from https://github.com/microbit-foundation/stan…
gerargz Sep 3, 2020
e8480a6
Update wake from deep sleep handling
gerargz Sep 4, 2020
4286a45
Red LED updates
gerargz Sep 7, 2020
03a2b4e
Delay deep sleep requests after we have determined if USB is enumerat…
gerargz Sep 10, 2020
3a155cc
Reset usb timeout counters for the next time we want to connect
gerargz Sep 10, 2020
555a919
Enter light sleep when idle
gerargz Sep 10, 2020
731558d
Send event for wake on edge and release the interrupt line on every n…
gerargz Sep 10, 2020
45ce359
Add I2C nop command on the comms interface. Doing an i2c write witht …
gerargz Sep 10, 2020
9548de6
Prevent Nop cmd from overwriting response from previous i2c write
gerargz Sep 11, 2020
a8558c3
Add I2C property to enable/disable automatic light sleep when idle
gerargz Sep 11, 2020
e6c7ef2
Temporal fix for broken details.txt
gerargz Sep 11, 2020
4bbad2a
Prevent entering light sleep if I2C transaction is ongoing
gerargz Sep 11, 2020
030847b
Temporal modification of USB max power to 300mA
gerargz Sep 11, 2020
957eff5
Reset the Power LED sleep state when waking up the NRF with COMBINED_…
gerargz Sep 11, 2020
e62fbae
Do not clear I2C buffers after waking up from VLPS
gerargz Sep 11, 2020
7a5ee8d
Remove references to i2c flash status cmd
gerargz Sep 11, 2020
a48a713
Prevent entering light-sleep mode when USB Host does re-enumeration (…
gerargz Sep 14, 2020
147b1b4
Set usb_state to disconnected immediately after cable deatch, instead…
gerargz Sep 15, 2020
ec3fec9
Lower battery voltage threshold for determining power source to avoid…
gerargz Sep 15, 2020
831fed9
I2C Flash interface updates
gerargz Sep 30, 2020
5d3b4e8
Fix lost serial bytes during flash operations
gerargz Oct 1, 2020
8eb2c4c
Move I2C files, to board specific folder
gerargz Oct 2, 2020
7e7c3fb
Don't enable bandgap reference during low power modes
gerargz Oct 2, 2020
6ac64b9
Low power updates:
gerargz Oct 3, 2020
f1bb93e
Request debugger power down after target is set to RUN state.
gerargz Oct 6, 2020
d94d02f
Increase priority of I2C
gerargz Oct 7, 2020
b1d3f2b
I2C low power updates
gerargz Oct 7, 2020
38fe9bc
#64 Assume "PC connected" at the start of USB communication instead o…
gerargz Oct 7, 2020
6f05cf9
#86 Change type of reset during button press and block button handlin…
gerargz Oct 9, 2020
e851540
#84 #82 Add hook for detecting when flashing has completed to return …
gerargz Oct 9, 2020
6a60f2b
#20 LED Behavior updates
gerargz Oct 9, 2020
a4a5c03
#62 Take ADC measurements for VIN and battery
gerargz Oct 13, 2020
e4e9b2d
#87 WebUSB LED blink workaround
gerargz Oct 13, 2020
9ff7357
#86 Return reset button to default state after flashing finishes to i…
gerargz Oct 14, 2020
1d78ae6
#92 Erase flash storage with erase.act file and allow filesize of up …
gerargz Oct 14, 2020
258d0b7
#54 Bump DAPLink version to 255
gerargz Oct 14, 2020
2dbce5c
#87 Improve power source handling with edge connector
gerargz Oct 15, 2020
5d90bf4
#95 Ignore out of bounds read for the storage file
gerargz Oct 15, 2020
1436bdc
#99 Enable flash protection on DAPLink bootloader region
gerargz Oct 18, 2020
2482d2a
Formatting and indentation
gerargz Jan 6, 2021
f3d9350
Add copyright and license header
gerargz Jan 6, 2021
1255534
Merge remote-tracking branch 'upstream/master' into microbit_features
gerargz Jan 9, 2021
7e18836
Consistent use of static for function
mbrossard Jan 9, 2021
3835a97
Make microbit bootloader optional for kl27z HIC
mbrossard Jan 13, 2021
de84e4c
Change storage API to avoid armgcc warning
gerargz Jan 22, 2021
9d09263
remove arm copyright from newly added files
gerargz Aug 12, 2021
44a2522
Updates after review:
gerargz Aug 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions records/board/kl27z_microbit_bl.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
common:
macros:
- MICROBIT_LOCK_BOOTLOADER
mathias-arm marked this conversation as resolved.
Show resolved Hide resolved
sources:
board:
- source/board/kl27z_microbit_bl.c
2 changes: 1 addition & 1 deletion source/board/microbitv2/pwr_mon.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#define ADC_MV_TO_ADC(x) ((x) * 0xFFF / 3300) // Convert mV to ADC value (12bit and 3.3V reference)
#define BATT_MIN_VOLTAGE 1500

void pwr_mon_bandgap_init(void);
static void pwr_mon_bandgap_init(void);
static uint32_t pwr_mon_read_vbg(uint32_t channelGroup);
static uint32_t pwr_mon_adc_to_mv(uint32_t raw_adc);

Expand Down
19 changes: 19 additions & 0 deletions source/hic_hal/freescale/kl27z/armcc/startup_MKL27Z4.s
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ __Vectors_Size EQU __Vectors_End - __Vectors
; <o5> Backdoor Comparison Key 5. <0x0-0xFF:2>
; <o6> Backdoor Comparison Key 6. <0x0-0xFF:2>
; <o7> Backdoor Comparison Key 7. <0x0-0xFF:2>
#if defined(MICROBIT_LOCK_BOOTLOADER)
BackDoorK0 EQU 0x4D ; 'M'
BackDoorK1 EQU 0x49 ; 'I'
BackDoorK2 EQU 0x43 ; 'C'
Expand All @@ -175,6 +176,16 @@ BackDoorK4 EQU 0x4F ; 'O'
BackDoorK5 EQU 0x42 ; 'B'
BackDoorK6 EQU 0x49 ; 'I'
BackDoorK7 EQU 0x54 ; 'T'
#else
BackDoorK0 EQU 0xFF
BackDoorK1 EQU 0xFF
BackDoorK2 EQU 0xFF
BackDoorK3 EQU 0xFF
BackDoorK4 EQU 0xFF
BackDoorK5 EQU 0xFF
BackDoorK6 EQU 0xFF
BackDoorK7 EQU 0xFF
#endif
; </h>
; <h> Program flash protection bytes (FPROT)
; <i> Each program flash region can be protected from program and erase operation by setting the associated PROT bit.
Expand All @@ -190,7 +201,11 @@ BackDoorK7 EQU 0x54 ; 'T'
; <o.5> FPROT3.5
; <o.6> FPROT3.6
; <o.7> FPROT3.7
#if defined(MICROBIT_LOCK_BOOTLOADER)
nFPROT3 EQU 0x0F ; Enable protection of the first 32 kB of flash
#else
nFPROT3 EQU 0x00
#endif
FPROT3 EQU nFPROT3:EOR:0xFF
; </h>
; <h> FPROT2
Expand Down Expand Up @@ -281,7 +296,11 @@ FOPT EQU 0x39
; * <2=> Backdoor key access enabled
; <3=> Backdoor key access disabled
; <i> Backdoor Key Security Enable
#if defined(MICROBIT_LOCK_BOOTLOADER)
FSEC EQU 0xBE
#else
FSEC EQU 0xFE
#endif
; </h>
; </h>

Expand Down
Loading