stmhal: In SysTick IRQ handler, make uwTick variable non-volatile.
uwTick can only change in the SysTick IRQ so this IRQ function does not need to take special care with this variable. It's important to make this IRQ function as efficient as possible.
This commit is contained in:
parent
e99e6c883d
commit
36bd10779c
|
@ -261,7 +261,10 @@ void SysTick_Handler(void) {
|
|||
// Instead of calling HAL_IncTick we do the increment here of the counter.
|
||||
// This is purely for efficiency, since SysTick is called 1000 times per
|
||||
// second at the highest interrupt priority.
|
||||
extern __IO uint32_t uwTick;
|
||||
// Note: we don't need uwTick to be declared volatile here because this is
|
||||
// the only place where it can be modified, and the code is more efficient
|
||||
// without the volatile specifier.
|
||||
extern uint32_t uwTick;
|
||||
uwTick += 1;
|
||||
|
||||
// Read the systick control regster. This has the side effect of clearing
|
||||
|
|
Loading…
Reference in New Issue