cancel
Showing results for 
Search instead for 
Did you mean: 

HAL Lib Always runs into time interrupt really fast, and Can not clear SR register.

CLi.14
Associate

0693W00000WLOz3QAH.png0693W00000WLOyyQAH.png0693W00000WLOyoQAH.png0693W00000WLOyeQAH.pngThe TIM SR register value always be 0x1F, And Can not use ____HAL_TIM_CLEAR_FLAG to clear the reg.

1 REPLY 1
KDJEM.1
ST Employee

Hello @CLi.14​  and welcome to the Community :),

I advise you to get inspired from the available TIM_TimeBase examples in the STM32CubeF1 MCU package. This example may help you in the configuration by following the instructions in the readme file.

Also, try to set the optimization level at none in the settings.

I hope this help you.

Thank you.

Kaouthar

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.