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:
Kristian Sloth Lauszus
2018-03-11 02:08:48 +01:00
parent 5093a0c0a6
commit 0b100feb32
14 changed files with 16 additions and 16 deletions

View File

@@ -1,7 +1,7 @@
#include "fsl_pit.h"
#include "timer.h"
uint32_t CurrentTime;
volatile uint32_t CurrentTime;
void PIT_TIMER_HANDLER(void)
{