Merge branch 'dev' into core3

This commit is contained in:
MichaelDvP
2026-03-21 11:19:05 +01:00
4 changed files with 35 additions and 29 deletions

View File

@@ -2744,36 +2744,37 @@ bool System::command_restart(const char * value, const int8_t id) {
std::string System::reset_reason(uint8_t cpu) const {
#ifndef EMSESP_STANDALONE
switch (esp_rom_get_reset_reason(cpu)) {
case 1:
case RESET_REASON_CHIP_POWER_ON:
return ("Power on reset");
// case 2 :reset pin not on esp32
case 3:
case 2: // not on esp32
return ("reset pin");
case RESET_REASON_CORE_SW:
return ("Software reset");
case 4: // not on S2, C3
return ("Legacy watch dog reset");
case 5:
case RESET_REASON_CORE_DEEP_SLEEP:
return ("Deep sleep reset");
case 6: // not on S2, C3
return ("Reset by SDIO");
case 7:
case 6: // RESET_REASON_CORE_SDIO: // not on S2, S3, C3
return ("Reset by SDIO");
case RESET_REASON_CORE_MWDT0:
return ("Timer group0 watch dog reset");
case 8:
case RESET_REASON_CORE_MWDT1:
return ("Timer group1 watch dog reset");
case 9:
case RESET_REASON_CORE_RTC_WDT:
return ("RTC watch dog reset");
case 10:
return ("Intrusion reset CPU");
case 11:
case RESET_REASON_CPU0_MWDT0:
return ("Timer group reset CPU");
case 12:
case RESET_REASON_CPU0_SW:
return ("Software reset CPU");
case 13:
case RESET_REASON_CPU0_RTC_WDT:
return ("RTC watch dog reset: CPU");
case 14: // not on S2, C3
case 14: // RESET_REASON_CPU1_CPU0: // not on S2, S3, C3
return ("APP CPU reset by PRO CPU");
case 15:
case RESET_REASON_SYS_BROWN_OUT:
return ("Brownout reset");
case 16:
case RESET_REASON_SYS_RTC_WDT:
return ("RTC watch dog reset: CPU+RTC");
default:
break;