Code: Select all
>>> tim=pyb.Timer(2,prescaler=0,period=0xffffffff)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: overflow converting long int to machine word
Likewise unhappy with negative numbers: (not surprising....)
Code: Select all
>>> tim=pyb.Timer(2,prescaler=0,period=-1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: must specify either freq, or prescaler and period