ESP32-sveltekit
ESP32-sveltekit copied to clipboard
Replace rtc_get_reset_reason(0) with esp_reset_reason()
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.