File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
ports/nordic/common-hal/microcontroller Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 88#include "py/obj.h"
99#include "py/runtime.h"
1010
11+ #if CIRCUITPY_ALARM
12+ #include "common-hal/alarm/__init__.h"
13+ #endif
14+
1115#include "common-hal/microcontroller/Pin.h"
1216#include "common-hal/microcontroller/Processor.h"
1317
@@ -78,6 +82,14 @@ void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) {
7882
7983void common_hal_mcu_reset (void ) {
8084 filesystem_flush ();
85+
86+ // Clear any saved info about last deep sleep wakeup,
87+ // to avoid confusing this software reset with a real deep sleep reset.
88+ // See logic in common_hal_mcu_processor_get_reset_reason().
89+ #if CIRCUITPY_ALARM
90+ sleepmem_wakeup_event = SLEEPMEM_WAKEUP_BY_NONE ;
91+ #endif
92+
8193 reset_cpu ();
8294}
8395
You can’t perform that action at this time.
0 commit comments