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.
1 parent fd28576 commit 2105432Copy full SHA for 2105432
ports/nordic/common-hal/microcontroller/__init__.c
@@ -8,6 +8,7 @@
8
#include "py/obj.h"
9
#include "py/runtime.h"
10
11
+#include "common-hal/alarm/__init__.h"
12
#include "common-hal/microcontroller/Pin.h"
13
#include "common-hal/microcontroller/Processor.h"
14
@@ -78,6 +79,12 @@ void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) {
78
79
80
void common_hal_mcu_reset(void) {
81
filesystem_flush();
82
+
83
+ // Clear any saved info about last deep sleep wakeup,
84
+ // to avoid confusing this software reset with a real deep sleep reset.
85
+ // See logic in common_hal_mcu_processor_get_reset_reason().
86
+ sleepmem_wakeup_event = SLEEPMEM_WAKEUP_BY_NONE;
87
88
reset_cpu();
89
}
90
0 commit comments