cancel
Showing results for 
Search instead for 
Did you mean: 

Timer instance not working

Refused_HC
Associate II

Hello all, I explain you my problem the best I can.

 

I have a project with the MCU STM32U575RGT6 The project has TouchGFX and FreeRTOS. After the initializations of the peripherals, I have the next calls, so the while(1) in main.c is not executed. As you can see in the next image.

Refused_HC_0-1770275394376.png

So for the moment the only main loop I have detected in the application is the timer interruption.

Refused_HC_1-1770275568170.png

In CubeMX I have 3 timers defined: TIM17, which is been assigned to the system as the timebase source:

Refused_HC_2-1770275664648.png

And timers 2 and 4 with the same exact parameters in CubeMX: (timer3 is related to an encoder....)

Refused_HC_3-1770275746935.png

 

Refused_HC_4-1770275763311.png

Refused_HC_5-1770275872540.png

I initialize the corresponding interruptions.

Refused_HC_6-1770275954325.png

The problem is that in the interruption HAL_TIM_PeriodElapsedCallback I never get the call of the timer 4 instance.

Refused_HC_7-1770276131730.png

Any help will be welcome.

 

 

 

 

 

 

1 REPLY 1
Gyessine
ST Employee

Hello @Refused_HC 
Can you check please Timer4 registers (TIM4_CR1,TIM4_ARR,TIM4_PSC,TIM4_CNT),are they getting initialized and working like they should be?
Additionally, monitor the related pin to determine whether the timer generates a signal if possible.
BR
Gyessine

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.