Timer Interrupt Code Doubt
Hello. I used to use the following code for starting a timer interrupt and used to set up the pre scalar and counter such a way I get the desired frequency but now this code is not working. My LED doesn't blink at all. I just wanted to check if the code is wrong or iff my hardware has some problem.
HAL_TIM_Base_Start_IT(&htim2);
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim){
if(htim->Instance == TIM2){
HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_5);
}
}