We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 28afed9 + a30f69a commit f826904Copy full SHA for f826904
ports/nrf/common-hal/microcontroller/__init__.c
@@ -82,10 +82,10 @@ void common_hal_mcu_enable_interrupts() {
82
83
void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) {
84
enum { DFU_MAGIC_UF2_RESET = 0x57 };
85
- if (runmode == RUNMODE_BOOTLOADER) {
86
- NRF_POWER->GPREGRET = DFU_MAGIC_UF2_RESET;
+ if (runmode == RUNMODE_BOOTLOADER || runmode == RUNMODE_UF2) {
+ sd_power_gpregret_set(0,DFU_MAGIC_UF2_RESET);
87
} else {
88
- NRF_POWER->GPREGRET = 0;
+ sd_power_gpregret_set(0,0);
89
}
90
if (runmode == RUNMODE_SAFE_MODE) {
91
safe_mode_on_next_reset(PROGRAMMATIC_SAFE_MODE);
0 commit comments