Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By dirkx
#14000 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.
User avatar
By Vijay Sharma
#14853 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 ?
User avatar
By dirkx
#15116 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.