Hello,
I try to use a TIM2 Interrupt to toggle a LED. I use a STM32F401C controller.
If I toggle the LED inside the while loop with delay, it works fine.
while (1)
{
HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_15);
HAL_Delay(1000);
}
...
I forgot to call TIM2-> DIER = TIM_DIER_UIE; Is there a HAL Function to set TIM->DIER ?These are the values of the peripheral TIM2 and NVIC. Timer 2 is counting.