Page 1 of 1

Timer and Watchdog Max Period

Posted: Sat Apr 06, 2019 9:43 am
by devnull
On the pyboard, why is the pyboard Watchdog period limited to a maximum of 30 seconds, and the hardware timer to a maximum of 15 seconds ?

I have been using the timer on the esp8266 set to 300,000 ms (5 minutes) to prevent a situation where the device stays awake for more than 5 minutes meaning that it has probably crashed and it works great.

But trying to port this to the pyboard-11 and pyboard-D I have hit this limitation !

Re: Timer and Watchdog Max Period

Posted: Sat Apr 06, 2019 2:34 pm
by dhylands
On the stm32 there are 16-bit and 32-bit timers. The max period will depend on the frequency of the timer and whether it's 16 or 32-bit.

For example a 16-bit timer running at 1MHz will have a max period of 65535 x 1 usec ticks or 65.535 msec.