STM32 General Purpose Timer: Interrupt-Enable
- December 13, 2021
- 1 reply
- 2613 views
Hello,
on a STM32G474 I use "Basic timers" (TIM6, TIM7), as well as a "General Purpose Timer"(TIM4).
For the "Basic Timers" I setup I2C devices an then enable the "Basic Timer"-Interrupt by calling HAL_TIM_Base_Start_IT . That works and the HAL_TIM_PeriodElapsedCallback is not called before HAL_TIM_Base_Start_IT was called.
I have the issue that I have calls of the HAL_TIM_PeriodElapsedCallback that come from TIM4 before I called HAL_TIM_Base_Start_IT, may I have the wrong config, or do these timers and the HAL work differently in that aspect?
I admit I find ST's documentation confusing and the Timer-Parameters hard to understand, even the cookbook, so if there is alternative documentation with examples, it would be nice if you could share that as well.
Thanks a lot in advance.
Best regards, Seppeltronics


