Skip to main content
CLi.14
Visitor II
December 20, 2022
Question

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

  • December 20, 2022
  • 1 reply
  • 647 views

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

This topic has been closed for replies.

1 reply

KDJEM.1
Technical Moderator
January 5, 2023

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.