These are chat archives for esp8266/Arduino

12th
Feb 2018
0xPIT
@0xPIT
Feb 12 2018 08:58
@me-no-dev thanks. the NMI timer variant works, but does not really reduce the jitter. I imagine that my resetting the timer by writing into T1L from an GPIO ISR can cause the jitter, even though interrupts are disabled while reloading the timer. What I do is having T1 loop with 100µS and reset it to 100µS upon a GPIO interrupt in order to sync the timer to the signal on the IO. Strangely, this has similar jitter as another approach: Setting single-short timer after every GPIO interrupt.
I guess I'll make a gist with the code.
Me No Dev
@me-no-dev
Feb 12 2018 20:46
@0xPIT generally you should try to set T1L in the beginning of the handler. What is the jitter you are getting? Can there be another interrupt causing this?