elapsedMillis ?

Status
Not open for further replies.

craiglindley

Well-known member
I'm using an elapsedMillis timer with the audio library and it doesn't seem to keep accurate time. It seems to be running at about half speed. Is there some interaction possibly with interrupts that is causing this? Or is this a figment of my imagination ?

Thanks
 
That sounds odd, I've found them to work even doing FFT's and counting seconds for perf counts - likely need more details to understand or reproduce
 
It seems possible. elapsedMillis is based on millis(), which in turn uses a systick counter which is incremented in an ISR at 1000Hz. If you disable interrupts for more than 1ms, you are going to loose systick interrupts.

millis() would be affected, that should be easy for you to check.
 
Status
Not open for further replies.
Back
Top