Skip to content

Commit c0d5639

Browse files
Fix unsigned long - 64bit when testing using LL functions
1 parent 82acd27 commit c0d5639

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Src/HALAL/Services/Time/Scheduler.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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

103103
SCHEDULER_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
}
107108
void Scheduler::update() {

0 commit comments

Comments
 (0)