The timer is now counting. The remaining question is how the program notices each elapsed period. The first answer reuses what you know: check a status flag. When the counter wraps, hardware sets UIF in TIM14_SR; the main loop checks for it, and on finding it set, clears it and toggles the LED.
The while wait stalls the program at the flag until it rises. Today’s if glances at the flag once per trip around the outer main loop and moves on either way. The rest of the main loop is then free for other work. The complete program is blinkyTimerPolled.c. We’ll run it next.
while (!(ADC1->ISR & ADC_ISR_EOC)) {} // Day 7: BLOCKING -- stand here until done
if (TIM14->SR & TIM_SR_UIF) { // today: glance once, keep moving
TIM14->SR = ~TIM_SR_UIF; // clear the flag
GPIOA->ODR ^= LED; // toggle the LED
}
// ... and the rest of the loop is free for other work
The while stalls the program at the flag until it rises. The processor cannot do anything else while waiting here. The if glances once per trip around the loop and moves on either way.
Not blinking? Two checks catch nearly everything: is blinkyTimerPolled.c actually in Src and part of the build, and is there exactly onemain() in the project: a leftover main.c from the template is the classic conflict. Still stuck? We’re here to help!