Timer and Watchdog Max Period

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
User avatar
devnull
Posts: 473
Joined: Sat Jan 07, 2017 1:52 am
Location: Singapore / Cornwall
Contact:

Timer and Watchdog Max Period

Post by devnull » Sat Apr 06, 2019 9:43 am

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 !

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Timer and Watchdog Max Period

Post by dhylands » Sat Apr 06, 2019 2:34 pm

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.

Post Reply