2016-12-11 01:05 PM
Hello,
I wanted to use TIM10 in STM32F401RCTx as periodic interrupt source using CubeMX.
I have enabled that timer, under 'Configuration' of TIM10 I have enabled 'TIM1 update interrupt and TIM10 global interrupt',
generated the code and loaded it into SW4STM32.Then I enable that timer, and set breakpoint in 'void TIM1_UP_TIM10_IRQHandler(void)'.
Program never stops there. I have cheked if TIM10 registers are set - they are, if counter register is counting up - it is.
Then I checked if TIM10_DIER register is set properly. It is not. I have to enable it by hand
' TIM10->DIER |= TIM_DIER_CC1IE_Msk;'Only then the interrupt works and I can use callback: 'void HAL_TIM_OC_DelayElapsedCallback(TIM_HandleTypeDef *htim)'Please, tell me if that is a bug or a feature.CubeMX is up to date. Frimware package for F4 series is 1.14.0 (latest)#interrupt #sw4stm32 #cubemx #interrupts2016-12-21 01:53 AM
Hello,
To enable the interrupt you shall the following function:
HAL_TIM_OC_Start_IT
Exemple: HAL_TIM_OC_Start_IT(&htim10,TIM_CHANNEL_1) ;
Then the callback:
HAL_TIM_OC_DelayE
lapsedCallback
Best regards