Documentation
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/fatal-errors.html
Settings you can utilise
Panic handler behaviour (CONFIG_ESP_SYSTEM_PANIC configuration)
What happens when a fatal issue occurs and what is output can be changed, including having the CPU halt if you wish:
menuconfig > Component config > ESP System Settings > Panic handler behaviour
