Skip to content

Commit fe6f5aa

Browse files
committed
atmel-samd: reset: reset() was always entering bootloader mode
.. set the dbl_tap word to a different special value unless RUNMODE_BOOTLOADER was selected
1 parent 5939497 commit fe6f5aa

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

ports/atmel-samd/common-hal/microcontroller/__init__.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ extern uint32_t _ezero;
5555

5656
void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) {
5757
// Set up the defaults.
58-
_bootloader_dbl_tap = DBL_TAP_MAGIC;
58+
_bootloader_dbl_tap = DBL_TAP_MAGIC_QUICK_BOOT;
5959
_ezero = CIRCUITPY_CANARY_WORD;
6060

6161
if (runmode == RUNMODE_BOOTLOADER) {

ports/atmel-samd/reset.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
// Copied from inc/uf2.h in https://github.com/Microsoft/uf2-samd21
3333
#define DBL_TAP_MAGIC 0xf01669ef // Randomly selected, adjusted to have first and last bit set
34+
#define DBL_TAP_MAGIC_QUICK_BOOT 0xf02669ef
3435

3536
extern uint32_t _bootloader_dbl_tap;
3637

0 commit comments

Comments
 (0)