diff options
Diffstat (limited to 'stmhal/stm32f4xx_it.c')
-rw-r--r-- | stmhal/stm32f4xx_it.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/stmhal/stm32f4xx_it.c b/stmhal/stm32f4xx_it.c index 4bd13c05cb..74fdf53d1e 100644 --- a/stmhal/stm32f4xx_it.c +++ b/stmhal/stm32f4xx_it.c @@ -173,7 +173,11 @@ void PendSV_Handler(void) { * @retval None */ void SysTick_Handler(void) { - HAL_IncTick(); + // 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; + uwTick += 1; // Read the systick control regster. This has the side effect of clearing // the COUNTFLAG bit, which makes the logic in sys_tick_get_microseconds |