info page: add ESP restart reason

this is another "restart reason" - sometimes provides clearer information, especially in case of crash or watchdog reset.
This commit is contained in:
Frank
2023-03-05 23:48:14 +01:00
parent ea30f456e5
commit 8d8fdfe77e
5 changed files with 68 additions and 2 deletions

View File

@@ -336,6 +336,18 @@ void WLED::setup()
USER_PRINT(F(" rev.")); USER_PRINT(ESP.getChipRevision());
USER_PRINT(F(", ")); USER_PRINT(ESP.getChipCores()); USER_PRINT(F(" core(s)"));
USER_PRINT(F(", ")); USER_PRINT(ESP.getCpuFreqMHz()); USER_PRINTLN(F("MHz."));
// WLEDMM begin
USER_PRINT(F("CPU "));
esp_reset_reason_t resetReason = getRestartReason();
USER_PRINT(restartCode2InfoLong(resetReason));
int core0code = getCoreResetReason(0);
int core1code = getCoreResetReason(1);
USER_PRINTF("Core#0 %s (%d)", resetCode2Info(core0code).c_str(), core0code);
if (core1code > 0) {USER_PRINTF("; Core#1 %s (%d)", resetCode2Info(core1code).c_str(), core1code);}
USER_PRINTLN(F("."));
// WLEDMM end
USER_PRINT(F("FLASH: ")); USER_PRINT((ESP.getFlashChipSize()/1024)/1024);
USER_PRINT(F("MB, Mode ")); USER_PRINT(ESP.getFlashChipMode());
#ifdef WLED_DEBUG