cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX does not set TIM10_DIER register (interrupt)

Tymoteusz Lipinski
Associate
Posted on December 11, 2016 at 22:05

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 #interrupts
1 REPLY 1
stm32cube-t
Senior III
Posted on December 21, 2016 at 10:53

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