atmel-samd: reset: reset() was always entering bootloader mode
.. set the dbl_tap word to a different special value unless RUNMODE_BOOTLOADER was selected
This commit is contained in:
parent
5939497218
commit
fe6f5aaa70
@ -55,7 +55,7 @@ extern uint32_t _ezero;
|
|||||||
|
|
||||||
void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) {
|
void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) {
|
||||||
// Set up the defaults.
|
// Set up the defaults.
|
||||||
_bootloader_dbl_tap = DBL_TAP_MAGIC;
|
_bootloader_dbl_tap = DBL_TAP_MAGIC_QUICK_BOOT;
|
||||||
_ezero = CIRCUITPY_CANARY_WORD;
|
_ezero = CIRCUITPY_CANARY_WORD;
|
||||||
|
|
||||||
if (runmode == RUNMODE_BOOTLOADER) {
|
if (runmode == RUNMODE_BOOTLOADER) {
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
// Copied from inc/uf2.h in https://github.com/Microsoft/uf2-samd21
|
// Copied from inc/uf2.h in https://github.com/Microsoft/uf2-samd21
|
||||||
#define DBL_TAP_MAGIC 0xf01669ef // Randomly selected, adjusted to have first and last bit set
|
#define DBL_TAP_MAGIC 0xf01669ef // Randomly selected, adjusted to have first and last bit set
|
||||||
|
#define DBL_TAP_MAGIC_QUICK_BOOT 0xf02669ef
|
||||||
|
|
||||||
extern uint32_t _bootloader_dbl_tap;
|
extern uint32_t _bootloader_dbl_tap;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user