0
\$\begingroup\$

one thing that make me confused is how the microcontroller notice the errors and restart by itself let me give an example we have cooler system with Esp 32 and temperature sensor,when temperature be Above 25 centigrade degrees cooler will work until temperature reduce to 25 degree . all the thing will work in the loop .

for example after 1 week of work errors come to esp , how is possible that Esp notice the error and restart automatically for fixing the error .

i don't want restart the board manually

\$\endgroup\$
17
  • 2
    \$\begingroup\$ it probably uses a watchdog timer ... the program has to "feed the dog" at a regular intervals to keep it from waking up .... basically it is a timer that gets reset by the running program often ... if the program hangs up and does not reset the timer, then the timer will count up to its trigger point and reset the microcotroller \$\endgroup\$
    – jsotola
    Nov 3 '20 at 7:06
  • 1
    \$\begingroup\$ duckduckgo.com/?q=watchdog+ic&ia=web \$\endgroup\$
    – jsotola
    Nov 3 '20 at 7:24
  • 1
    \$\begingroup\$ @A.R.C. a thermal watchdog is available \$\endgroup\$
    – jsotola
    Nov 3 '20 at 7:29
  • 1
    \$\begingroup\$ I think the best way would be to debug and test your program to fix this error and not find a solution to restart regulary. (A watchdog is nevertheless always a good idea.) \$\endgroup\$
    – A.R.C.
    Nov 3 '20 at 7:29
  • 1
    \$\begingroup\$ "esp 32 hang itself" is not a description in terms of the esp32 itself, so no, it won't be able to detect that. Ot migt detect circuistances that have the same external effect, via a watchodg, a brownout circuit, or even by software. \$\endgroup\$ Nov 3 '20 at 18:03