Hello all!
How can I get the current count of a timer without stopping it?
Right now I'm doing like this:
_timer_base->TASKS_CAPTURE[channel] = 1;
uint32_t counter = _timer_base->CC[channel];
return counter;
That returns the expected value, but the timer seems to stop after this. I'm running the timer in a continuous-like mode, where it generates an interrupt every 2 seconds, and these 2 seconds are set by the code (could be any value). But after I executed the above code, the timer just stops interrupting.
Am I missing something here?