How to detect boot type (ESP32 S3)

monaco87
Posts: 1
Joined: Tue Apr 22, 2025 2:22 pm

How to detect boot type (ESP32 S3)

Postby monaco87 » Tue Apr 22, 2025 2:29 pm

I have a project that also includes a Task Watch Dog Timer (WDT) timeout to prevent lockup. What I'm trying to do is detect at boot time what sort of restart is happening. I've noticed the following on the serial console:

Power On or Reset Button: console shows

Code: Select all

rst:0x1 (POWERON)
WDT reboot : console shows

Code: Select all

rst:0xc (RTC_SW_CPU_RST)
Is there any way to read these parameters from software at boot time in the Arduino environment to detect the boot type?

I want to customise the Arduino setup() differently for each.

Thanks

Sprite
Espressif staff
Espressif staff
Posts: 10609
Joined: Thu Nov 26, 2015 4:08 am

Re: How to detect boot type (ESP32 S3)

Postby Sprite » Wed Apr 23, 2025 2:16 am

You should be able to call esp_reset_reason() from Arduino as well.


Who is online

Users browsing this forum: Semrush [Bot], trendictionbot and 4 guests