File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,14 +94,15 @@ void Scheduler::start() {
9494 Scheduler_global_timer->CNT = 0 ; /* Clear counter value */
9595
9696 NVIC_EnableIRQ (SCHEDULER_GLOBAL_TIMER_IRQn);
97- Scheduler_global_timer-> SR &= ~LL_TIM_SR_UIF; /* clear update interrupt flag */
97+ LL_TIM_ClearFlag_UPDATE ( Scheduler_global_timer);
9898 // NOTE(vic): We don't need to set the flag since there won't be any tasks at the start/it will get set in schedule_next_interval()
9999 Scheduler::global_timer_enable ();
100100 // Scheduler::schedule_next_interval();
101101}
102102
103103SCHEDULER_GLOBAL_TIMER_CALLBACK () {
104- Scheduler_global_timer->SR &= ~TIM_SR_UIF;
104+ /* clear update interrupt flag */
105+ LL_TIM_ClearFlag_UPDATE (Scheduler_global_timer);
105106 Scheduler::on_timer_update ();
106107}
107108void Scheduler::update () {
You can’t perform that action at this time.
0 commit comments