How to enable global interrupt for TIM3 (in PWM mode)
Hi,
I want to enable the global interrupt for TIM3 so that I can recognize when it becimes active (it raises the pin).
I've added:
if(htim_base->Instance==TIM3)
{
/* Peripheral clock enable */
__HAL_RCC_TIM3_CLK_ENABLE();
/* TIM2 interrupt Init */
HAL_NVIC_SetPriority(TIM3_IRQn, 5, 0);
HAL_NVIC_EnableIRQ(TIM3_IRQn);
}
this to my void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base) and can confirm that it gets executed and finally added
void TIM3_IRQHandler(void)
{
HAL_TIM_IRQHandler(&htim3);
}
into stm32f4xx_it.c but I still don't get a TIM3 callback in void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim). What am I missing?
I can see the PWM waveform on my scope but TIM3_IRQHandler() never gets invoked