He kindly indicated me a way to do so (on the git issue board) with the following:
Code: Select all
import uasyncio as asyncio
from machine import WDT
async def do_wdt():
tim = 300000
wdt = WDT(timeout=tim)
while True:
wdt.feed()
await asyncio.sleep(tim // 10) # Feed 10 times in timeout period (very conservative)
...
loop = asyncio.get_event_loop()
loop.create_task(do_wdt())
Code: Select all
WDT(timeout=tim)
How could I properly handle this WDT coroutine?
Many thanks,
Sébastien