Hello everyone. Why the function HAL_GetTick() does not disable interrupts before accessing uwTick? What happens if SysTick interrupt occurs while reading uwTick?
..
..
The 32-bit read should be atomic, the read/write multiples typically aren't, I don't know with 100% certainty the action of LDRD/STRD, this could however be guarded with a double read.
Seems not if you reuse the register you're using as an address...
http://www.keil.com/support/docs/3442.htm
Although I kind of think it restarts completely (do over), so if the Systick preempts everything and is the only thing writing the incremented pair, it would be very hard (tends to impossible) for a foreground task to get a miss-matched pair.
I wouldn't use LDRD/STRD on a hardware FIFO, looks to be a definite hazard there.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.