How to enable watchdog timer in esp32?

I have an esp32 , during my project run, some instances esp32 is crashed.

then I try to plan watchdog timer feature in esp32 so that while stuck the program, the module is restarted automatically.

could you please tell me, how can I implement watchdog timer in esp32 ?

thanks.

I am guessing that, at least one WDT is already enabled. Are you getting a Guru Meditation error, then its not a WDT issue.

Anyways, if you want to poke around the WDT, yourself, you might look at the ESP32 Watchdogs API Watchdogs - ESP32 - — ESP-IDF Programming Guide latest documentation

Also you might be interested in Fatal Errors - ESP32 - — ESP-IDF Programming Guide latest documentation which is the ESP32 Fatal Errors API.