STM32G0B0 timer3 LL_TIM_ClearFlag_UPDATE not clearing the Timer3->SR update bit.
STM32G0B0
STM32CubeIDE Version: 1.12.0
Segger JLink debugger
Moving from a STM32F micro with Standard Peripheral drivers to STM32G0B0 with Low Level drivers. Timer 3 is a simple configuration to interrupt and auto reload. After bring up the new processor the timer 3 is interrupting correctly but calls to clear the Timer Update flag(LL_TIM_ClearFlag_UPDATE(TIM3)) do not work. Because the Update flag is not clearing the interrupt is constantly triggering. The other strange thing is that the CCR interrupts seem to be on as well but they have not been configured.
Is it some simple configuration thing new to G0 micro's? (all this worked on the F0)
Configuration seems correct
LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_TIM3);
// Timer 3 configuration. We want a timer 3 frequency of 2Khz(a interrupt
// every .5msec
tim_prescaler = 0;
TimOutClock = SystemCoreClock/1;
tim_period = __LL_TIM_CALC_ARR(TimOutClock, tim_prescaler, 2000);
TIM_TimeBaseStructure.Prescaler = tim_prescaler;
TIM_TimeBaseStructure.CounterMode = LL_TIM_COUNTERMODE_UP;
TIM_TimeBaseStructure.Autoreload = tim_period;
TIM_TimeBaseStructure.ClockDivision = LL_TIM_CLOCKDIVISION_DIV1;
TIM_TimeBaseStructure.RepetitionCounter = 0;
LL_TIM_Init(TIM3, &TIM_TimeBaseStructure);
/* Enable the TIM3 global Interrupt */
NVIC_SetPriority(TIM3_TIM4_IRQn, 1);
NVIC_EnableIRQ(TIM3_TIM4_IRQn);
// Turn on the timer 3 interrupt enable and then enable timer 3.
LL_TIM_ClearFlag_UPDATE(TIM3);
LL_TIM_EnableIT_UPDATE(TIM3);
LL_TIM_EnableCounter(TIM3); 