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
Please register or sign in to comment