Handling Timer Overflow Interrupts - Arduino Forum
I clear the timer, set it up in Input Capture Mode, set the pre-scaler to ClkIO1024, and enable Overflow interrupts, as the event Im timing can take up to 10 seconds, which means the timer may overflow twice. I maintain a software count, in a uint32_t that is increment by 65536 every time an overflow occurs.
more
|