Skip to content

Commit 2d54830

Browse files
dhalberttannewt
authored andcommitted
Checked wrong RCAUSE bit for system_reset
1 parent 1805bca commit 2d54830

File tree

1 file changed

+2
-2
lines changed
  • ports/atmel-samd/supervisor

1 file changed

+2
-2
lines changed

ports/atmel-samd/supervisor/port.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ safe_mode_t port_init(void) {
8181
#ifdef CIRCUITPY_CANARY_WORD
8282
#ifdef SAMD21
8383
bool power_on_or_external_reset = hri_pm_get_RCAUSE_POR_bit(PM) || hri_pm_get_RCAUSE_EXT_bit(PM);
84-
bool system_reset = hri_pm_get_RCAUSE_EXT_bit(PM);
84+
bool system_reset = hri_pm_get_RCAUSE_SYST_bit(PM);
8585
#endif
8686
#ifdef SAMD51
8787
bool power_on_or_external_reset = hri_rstc_get_RCAUSE_POR_bit(RSTC) || hri_rstc_get_RCAUSE_EXT_bit(RSTC);
88-
bool system_reset = hri_rstc_get_RCAUSE_EXT_bit(RSTC);
88+
bool system_reset = hri_rstc_get_RCAUSE_SYST_bit(RSTC);
8989
#endif
9090
if (power_on_or_external_reset) {
9191
_ezero = CIRCUITPY_CANARY_WORD;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy