feat: async 10ms timer handler (#5424)

This commit is contained in:
Raphael Coeffic
2024-08-13 22:24:06 +10:00
committed by GitHub
parent b6d0bac2a0
commit 2df817fbf0
2 changed files with 31 additions and 2 deletions
@@ -26,6 +26,8 @@
#include "hal.h"
#include "hal/watchdog_driver.h"
#include "FreeRTOSConfig.h"
static volatile uint32_t _ms_ticks;
static void _init_1ms_timer()
@@ -41,8 +43,9 @@ static void _init_1ms_timer()
MS_TIMER->EGR = 0;
MS_TIMER->CR1 = TIM_CR1_CEN | TIM_CR1_URS;
MS_TIMER->DIER = TIM_DIER_UIE;
NVIC_EnableIRQ(MS_TIMER_IRQn);
NVIC_SetPriority(MS_TIMER_IRQn, 4);
NVIC_SetPriority(MS_TIMER_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
}
void timersInit()