esp32:watchdog
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| esp32:watchdog [2022/04/25 19:56] – created aistis | esp32:watchdog [2022/04/25 20:10] (current) – aistis | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | aaa | + | esp32 watchdog |
| + | |||
| + | <code cpp> | ||
| + | |||
| + | #include " | ||
| + | void IRAM_ATTR resetModule() { | ||
| + | ets_printf(" | ||
| + | esp_restart(); | ||
| + | } | ||
| + | |||
| + | |||
| + | //setup | ||
| + | timer = timerBegin(0, | ||
| + | timerAttachInterrupt(timer, | ||
| + | const int wdtTimeout = 3000; //time in ms to trigger the watchdog | ||
| + | timerAlarmWrite(timer, | ||
| + | timerAlarmEnable(timer); | ||
| + | |||
| + | |||
| + | // | ||
| + | timerWrite(timer, | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
esp32/watchdog.1650905784.txt.gz · Last modified: by aistis
