Mark uptime counter volatile to avoid miscompilation of delay loops
Since the uptime counter is updated in an ISR, the compiler may attempt to optimize away code that checks for an updated value. Avoid this by marking the uptime counter as volatile.
Showing with 2 additions and 2 deletions
Please register or sign in to comment