-->
Page 1 of 1

microsecond timer accuracy

PostPosted: Thu Apr 09, 2015 11:32 am
by dirkx
By defining USE_US_TIMER and using system_timer_reinit() one can get microsecond accurate timers.

However it seems that setting the timer with

os_timer_arm(&some_timer, 5000, 1);

is still done in microseconds. Is that correct ? Is there a way to set it microsecond accurate - I am trying to bitbang a SMPTE timecode with a jitter ideally well below a few 100 micro seconds/bit.

Thanks,

Dw.

Re: microsecond timer accuracy

PostPosted: Fri Apr 17, 2015 2:07 pm
by Vijay Sharma
Hi Dirkx, I also have the same issue. I need a timer with microsecond accuracy but delay() does not give so. Can you tell me more on how are you using the below code, I may be able to dig in ?

Re: microsecond timer accuracy

PostPosted: Mon Apr 20, 2015 8:04 am
by dirkx
Turns out there is a new function (not quite part of the header files yet):

ets_timer_arm_new(&some_timer, timeInMicroSecOrMiliSec, repeat, X);

where X=0 means microseconds and X=1 means milliseconds.

Dw.