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 8
8
#include "py/obj.h"
9
9
#include "py/runtime.h"
10
10
11
+ #if CIRCUITPY_ALARM
12
+ #include "common-hal/alarm/__init__.h"
13
+ #endif
14
+
11
15
#include "common-hal/microcontroller/Pin.h"
12
16
#include "common-hal/microcontroller/Processor.h"
13
17
@@ -78,6 +82,14 @@ void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) {
78
82
79
83
void common_hal_mcu_reset (void ) {
80
84
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
+
81
93
reset_cpu ();
82
94
}
83
95
You can’t perform that action at this time.
0 commit comments