I'm not having much luck. No matter what value I use for
Code: Select all
int countdownMS = Watchdog.enable(6000);
Serial.print(countdownMS, DEC);
400 sets to 250
1500 sets to 1000
2200 sets to 2000
2500 sets to 2000
6000 sets to 4000
16000 sets to 16000 but 15000 sets to 8000.
But the biggest problem is, when it is not reset in time, there's an exception that seems to have something to do with Serial. I would have expected a watchdog timeout to restart the code.
Are my assumptions wrong? Or is there a better tool I should be using for a watchdog timer?
Here's the error FWIW:
Code: Select all
Exception in thread rx:
Traceback (most recent call last):
File "C:\Users\Baxter\.platformio\python3\lib\threading.py", line 926, in _bootstrap_inner
self.run()
File "C:\Users\Baxter\.platformio\python3\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "c:\users\Baxter\.platformio\penv\lib\site-packages\serial\tools\miniterm.py", line 445, in reader
data = self.serial.read(self.serial.in_waiting or 1)
File "c:\users\Baxter\.platformio\penv\lib\site-packages\serial\serialwin32.py", line 257, in in_waiting
raise SerialException("ClearCommError failed ({!r})".format(ctypes.WinError()))
serial.serialutil.SerialException: ClearCommError failed (PermissionError(13, 'The device does not recognize the command.', None, 22))