Global variables shared between an interrupt and the main code should be volatile
See: https://www.embedded.com/electronics-blogs/beginner-s-corner/4023801/Introduction-to-the-Volatile-Keyword
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
// Variables:
|
||||
|
||||
extern uint32_t CurrentTime;
|
||||
extern volatile uint32_t CurrentTime;
|
||||
|
||||
// Functions:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user