You can create functions of timer and call_back to replace while(1) loop in the non-OS SDK.
If the consecutive execution time of a piece of code exceeds 3.2s, you can disable the watchdog reset through the following methods:
- Call the function of systerm_soft_wdt_stop() before executing this piece of code. It takes 6s from closing wdt to wdt hard trigger.
- Execute watchdog feed several times, i.e., systerm_soft_wdt_feed().
- After completing the execution, call the function of systerm_soft_wdt_restart().