diff options
| author | Jeff Epler <jepler@gmail.com> | 2021-03-19 10:11:24 -0500 |
|---|---|---|
| committer | Jeff Epler <jepler@gmail.com> | 2021-03-19 10:11:45 -0500 |
| commit | 06743d91ed0df5c73fe9554dc05e47a6eeec1414 (patch) | |
| tree | 2907172939dfc23a4d8f7818533bf5fa8040f703 /ports | |
| parent | d0125617fd9b2652faa1f3c9a88277304fcc66c4 (diff) | |
mimxrt1011: Fix reset-to-bootloader
The definition of DBL_TAP_REG must match tinyuf2
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/mimxrt10xx/common-hal/microcontroller/__init__.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ports/mimxrt10xx/common-hal/microcontroller/__init__.c b/ports/mimxrt10xx/common-hal/microcontroller/__init__.c index 2daf108af..3f638dc03 100644 --- a/ports/mimxrt10xx/common-hal/microcontroller/__init__.c +++ b/ports/mimxrt10xx/common-hal/microcontroller/__init__.c @@ -39,6 +39,8 @@ #include "supervisor/shared/safe_mode.h" #include "supervisor/shared/translate.h" +#define DBL_TAP_REG SNVS->LPGPR[3] + void common_hal_mcu_delay_us(uint32_t delay) { mp_hal_delay_us(delay); } @@ -72,10 +74,10 @@ void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) { } // Pretend to be the first of the two reset presses needed to enter the // bootloader. That way one reset will end in the bootloader. - SNVS->LPGPR[0] = DBL_TAP_MAGIC; + DBL_TAP_REG = DBL_TAP_MAGIC; } else { // Set up the default. - SNVS->LPGPR[0] = DBL_TAP_MAGIC_QUICK_BOOT; + DBL_TAP_REG = DBL_TAP_MAGIC_QUICK_BOOT; } if (runmode == RUNMODE_SAFE_MODE) { safe_mode_on_next_reset(PROGRAMMATIC_SAFE_MODE); |
