medium10 pts · first answer countsfirmwareinterruptsconcurrency
Counter read gives odd values
On an 8-bit AVR, a timer ISR increments a volatile uint32_t tick counter. Main code sometimes reads values that are wildly wrong for one sample. Why?
Discussion 0
Join free to post in the discussion.
Related questions
- Why use volatileEmbedded Systems Engineer
- Keeping ISRs shortEmbedded Systems Engineer
- The interrupt vector tableEmbedded Systems Engineer
- Heavy work in an interruptEmbedded Systems Engineer
- printf in an interruptEmbedded Systems Engineer
- First words read after resetEmbedded Systems Engineer
- Why registers are volatileEmbedded Systems Engineer
- Value of an uninitialised globalEmbedded Systems Engineer