Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

ItsyBitsyM0Express Timer Issue
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

ItsyBitsyM0Express Timer Issue

by netless on Sat Aug 08, 2020 1:38 am

I'm having problems setting up a timer on the IB-M0 Express when powering it with 5V to BAT.

As an example I compiled the timer code at
https://gist.github.com/jdneo/43be30d85 ... 3500d3f989

This code compiles & runs to produce a perfect 10 Hz pulse when the IB is connected to a computer USB power source.

However, run this code from 5V into BAT, without a USB computer connection, and the frequency is only 9.7 Hz

Show it 5V from the computer USB & the frequency will correct to 10 Hz, and stay there even after the computer USB is removed - until the next reboot.

Somehow the IB appears to need a USB computer connection to calibrate it timing correctly.

I have encountered the same problem with other timer code examples.

I have also run this code on a Feather M0 and in this case it works perfectly powered from either USB computer or any other 5V source.

Can anyone shed some light on this power source / timer issue with the ItsyBitsy M0 Express and perhaps suggest solutions.

netless
 
Posts: 10
Joined: Sat Sep 22, 2018 4:20 am

Re: ItsyBitsyM0Express Timer Issue

by westfw on Sat Aug 08, 2020 9:43 pm

Somehow the IB appears to need a USB computer connection to calibrate it timing correctly.

That could in fact be the case. I think when using USB, the chip will sync its clock to the USB timing, but when USB isn't connected, you end up using the internal RC clock, which is less accurate. I think you should be able to get closer than 3%, though.
I'm not sure what happens if the code enables USB clock synchronization and USB isn't actually connected. (which I think is what happens with the ItsyBitsy...)

westfw
 
Posts: 1720
Joined: Fri Apr 27, 2007 1:01 pm
Location: SF Bay area

Please be positive and constructive with your questions and comments.