summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2018-01-08 18:14:21 -0500
committerScott Shawcroft <scott@tannewt.org>2018-01-08 15:45:07 -0800
commit2d5483082d9588f89d6797183a8dfcf5104e3fb7 (patch)
treef60e204e3f40abe264e32cd3ee605851128524ec
parent1805bcac76e7751493b6b3853279429ff4920cb9 (diff)
Checked wrong RCAUSE bit for system_reset
-rw-r--r--ports/atmel-samd/supervisor/port.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c
index 7d8c06822..1de6b856d 100644
--- a/ports/atmel-samd/supervisor/port.c
+++ b/ports/atmel-samd/supervisor/port.c
@@ -81,11 +81,11 @@ safe_mode_t port_init(void) {
#ifdef CIRCUITPY_CANARY_WORD
#ifdef SAMD21
bool power_on_or_external_reset = hri_pm_get_RCAUSE_POR_bit(PM) || hri_pm_get_RCAUSE_EXT_bit(PM);
- bool system_reset = hri_pm_get_RCAUSE_EXT_bit(PM);
+ bool system_reset = hri_pm_get_RCAUSE_SYST_bit(PM);
#endif
#ifdef SAMD51
bool power_on_or_external_reset = hri_rstc_get_RCAUSE_POR_bit(RSTC) || hri_rstc_get_RCAUSE_EXT_bit(RSTC);
- bool system_reset = hri_rstc_get_RCAUSE_EXT_bit(RSTC);
+ bool system_reset = hri_rstc_get_RCAUSE_SYST_bit(RSTC);
#endif
if (power_on_or_external_reset) {
_ezero = CIRCUITPY_CANARY_WORD;