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.
pull/1644/head
Damien George 2015-11-24 16:23:54 +00:00
rodzic e99e6c883d
commit 36bd10779c
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -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