WatchDogMode.RAISE does work correctly. There is an exception raised if I hold down the "kill switch" for more than 10 seconds. However, WatchDogMode.RESET does nothing that I can see.
Code: Select all
import board
from digitalio import DigitalInOut
from microcontroller import watchdog as w
from watchdog import WatchDogMode
import time
# Kill switch -- normally high
button = DigitalInOut(board.IO4)
w.timeout = 10.0
w.mode = WatchDogMode.RAISE
while True:
w.feed()
while button.value == 0:
pass