Function assert, panic, abort, IWDT... question
Posted: Wed Oct 09, 2024 10:31 am
Hello everyone.
I am working on a commercial project with ESP32C3.
I would like to avoid unpleasant situations, if the "application" freezes, I would like to properly configure the ESP internal functions assert, panic, abort, reset, IWDT...
Which of the above functions can cause freezing, i.e. which have a while(1) that they don't exit? How to override or change them?
IWDT configuration is enabled. I would like to break the "freeze" inside the panic_abort() function (called from the assert() function).
Is it possible and how to configure another own IWDT, I would like to reset it in some other way, not from the FreeRtosTickHook function?
I see that ESP reconfigures the IWDT internally when state determinations happen (COREDUMP; GDBSTUB...), so I don't know if it is possible to have another own IWDT configured in the application? How does the panicHandler(void *frame) function get called?
Ideally, if the esp_system_abort() or panic_abort() function is called, I would call my own function where it would record the error in the ESP_NVS memory, and then continue with the called ..abort() function. Is there a way?
Thanks in advance to everyone for your help.
I am working on a commercial project with ESP32C3.
I would like to avoid unpleasant situations, if the "application" freezes, I would like to properly configure the ESP internal functions assert, panic, abort, reset, IWDT...
Which of the above functions can cause freezing, i.e. which have a while(1) that they don't exit? How to override or change them?
IWDT configuration is enabled. I would like to break the "freeze" inside the panic_abort() function (called from the assert() function).
Is it possible and how to configure another own IWDT, I would like to reset it in some other way, not from the FreeRtosTickHook function?
I see that ESP reconfigures the IWDT internally when state determinations happen (COREDUMP; GDBSTUB...), so I don't know if it is possible to have another own IWDT configured in the application? How does the panicHandler(void *frame) function get called?
Ideally, if the esp_system_abort() or panic_abort() function is called, I would call my own function where it would record the error in the ESP_NVS memory, and then continue with the called ..abort() function. Is there a way?
Thanks in advance to everyone for your help.