OpenMV Feature: WDT()
Description
WDT working for the STM32, MIMXRT, and Alif on the machine module.
All watchdog types need to work. For example, on the STM32, only the IWDG is implemented right now; however, this watchdog will reset you during deep sleep. There's another watchdog on the STM32 that turns off when in deep sleep.
Code Size
No response
Implementation
I hope the MicroPython maintainers or community will implement this feature
Code of Conduct
Yes, I agree
stmhal: WDT hangs after programming
I discovered an interesting quirk related to the IWDG.
If I program my pyboard using pydfu, then trying this in the REPL immediately afterwards hangs:
>>> wdt = machine.WDT(0, 5000)
By hangs, I mean it never returns the REPL. I added some debug prints and it seems to stuck in the IWDG->SR & 1 loop and the value of SR is 3.
If I hit the RESET button, then the wdt = machine.WDT(0, 5000) works exactly as expected.