ESP32-sveltekit icon indicating copy to clipboard operation
ESP32-sveltekit copied to clipboard

Replace rtc_get_reset_reason(0) with esp_reset_reason()

Open stamp opened this issue 7 months ago • 0 comments

The current implementation using rtc_get_reset_reason(0) only retrieves the reset reason for CPU 0. This poses a problem since the user application typically runs on CPU 1, where programming errors such as panics or exceptions are more likely to occur.

I solved this by switching to the esp_reset_reason() function, which provides a more accurate reset reason for both CPUs at the same time.

stamp avatar Apr 10 '25 05:04 stamp