hard20 pts · first answer countsmicrocontrollerstimers
Elapsed ticks across a timer wrap
A free-running 16-bit timer is read at the start and end of an operation. start is 65000 and now is 500, after one wrap. What does the code below store in elapsed?
uint16_t start = 65000, now = 500; uint16_t elapsed = (uint16_t)(now - start);
Discussion 0
Join free to post in the discussion.
Related questions
- PWM duty cycleEmbedded Systems Engineer
- Timer prescaler mathsEmbedded Systems Engineer
- What an open-drain output can doEmbedded Systems Engineer
- Button wired to ground with pull-upEmbedded Systems Engineer
- Meaning of an NRST pinEmbedded Systems Engineer
- Setting bit 5 of a registerEmbedded Systems Engineer
- GPIO alternate function modeEmbedded Systems Engineer
- Polling versus interruptsEmbedded Systems Engineer