Closed Glowman554 closed 1 year ago
You can auto-restart with abort()/assert()/esp_restart().
However, unless the error is recovered, it will auto-restart forever. Auto-restart makes it difficult to find the cause of the problem.
For development purposes esp-idf allows you to turn auto restarts off. It allows you to have the feature when deploying.
For development purposes esp-idf allows you to turn auto restarts off.
how do i set it?
Using CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT halts the cpu instead of rebooting. I think it is located under components - > esp system settings
The default configuration is CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT
Using CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT halts the cpu instead of rebooting. I think it is located under components - > esp system settings
Thank you
Hey would it be ok if i implement a error callback function which by default uses while(1) { vTaskDelay(1); }
but can be overwritten by the user using weak linking?
Hey would it be ok if i implement a error callback function which by default uses while(1) { vTaskDelay(1); } but can be overwritten by the user using weak linking?
Try it.
Wouldn't it be better to use
abort()
or some other sort of error handler instead ofwhile(1) { vTaskDelay(1); }
when an error occurs? It would allow the user to handle errors or at least auto reboot the esp32.