We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fd28576 commit 86c5680Copy full SHA for 86c5680
1 file changed
ports/nordic/common-hal/microcontroller/__init__.c
@@ -8,6 +8,10 @@
8
#include "py/obj.h"
9
#include "py/runtime.h"
10
11
+#if CIRCUITPY_ALARM
12
+#include "common-hal/alarm/__init__.h"
13
+#endif
14
+
15
#include "common-hal/microcontroller/Pin.h"
16
#include "common-hal/microcontroller/Processor.h"
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();
94
}
95
0 commit comments