Merge pull request #6534 from tannewt/esp_wdt_safe_mode

Safe mode when ESP interrupt watchdog fires
This commit is contained in:
Dan Halbert 2022-06-30 22:56:35 -04:00 committed by GitHub
commit 187f156ac7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 12 deletions

View File

@ -72,7 +72,7 @@ msgstr ""
#: ports/mimxrt10xx/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/analogio/AnalogOut.c ports/nrf/common-hal/rtc/RTC.c #: ports/nrf/common-hal/analogio/AnalogOut.c ports/nrf/common-hal/rtc/RTC.c
#: ports/raspberrypi/common-hal/analogio/AnalogOut.c #: ports/raspberrypi/common-hal/analogio/AnalogOut.c
#: ports/raspberrypi/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/rtc/RTC.c ports/stm/common-hal/rtc/RTC.c
msgid "%q" msgid "%q"
msgstr "" msgstr ""
@ -432,7 +432,6 @@ msgstr ""
msgid "All event channels in use" msgid "All event channels in use"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/pulseio/PulseIn.c
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "All state machines in use" msgid "All state machines in use"
msgstr "" msgstr ""
@ -518,7 +517,7 @@ msgstr ""
msgid "AuthMode.OPEN is not used with password" msgid "AuthMode.OPEN is not used with password"
msgstr "" msgstr ""
#: shared-bindings/wifi/Radio.c #: shared-bindings/wifi/Radio.c supervisor/shared/web_workflow/web_workflow.c
msgid "Authentication failure" msgid "Authentication failure"
msgstr "" msgstr ""
@ -1160,6 +1159,10 @@ msgstr ""
msgid "Internal error #%d" msgid "Internal error #%d"
msgstr "" msgstr ""
#: supervisor/shared/safe_mode.c
msgid "Internal watchdog timer expired."
msgstr ""
#: py/argcheck.c #: py/argcheck.c
msgid "Invalid %q" msgid "Invalid %q"
msgstr "" msgstr ""
@ -2244,10 +2247,6 @@ msgstr ""
msgid "WatchDogTimer.timeout must be greater than 0" msgid "WatchDogTimer.timeout must be greater than 0"
msgstr "" msgstr ""
#: supervisor/shared/safe_mode.c
msgid "Watchdog timer expired."
msgstr ""
#: py/builtinhelp.c #: py/builtinhelp.c
#, c-format #, c-format
msgid "" msgid ""
@ -3915,10 +3914,6 @@ msgstr ""
msgid "source_bitmap must have value_count of 8" msgid "source_bitmap must have value_count of 8"
msgstr "" msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "ssid can't be more than 32 bytes"
msgstr ""
#: py/objstr.c #: py/objstr.c
msgid "start/end indices" msgid "start/end indices"
msgstr "" msgstr ""

View File

@ -214,6 +214,9 @@ safe_mode_t port_init(void) {
case ESP_RST_PANIC: case ESP_RST_PANIC:
return HARD_CRASH; return HARD_CRASH;
case ESP_RST_INT_WDT: case ESP_RST_INT_WDT:
// The interrupt watchdog is used internally to make sure that latency sensitive
// interrupt code isn't blocked. User watchdog resets come through ESP_RST_WDT.
return WATCHDOG_RESET;
case ESP_RST_WDT: case ESP_RST_WDT:
default: default:
break; break;

View File

@ -178,7 +178,7 @@ void print_safe_mode_message(safe_mode_t reason) {
message = translate("Boot device must be first device (interface #0)."); message = translate("Boot device must be first device (interface #0).");
break; break;
case WATCHDOG_RESET: case WATCHDOG_RESET:
message = translate("Watchdog timer expired."); message = translate("Internal watchdog timer expired.");
break; break;
case NO_CIRCUITPY: case NO_CIRCUITPY:
message = translate("CIRCUITPY drive could not be found or created."); message = translate("CIRCUITPY drive could not be found or created.");