Skip to main content
RPG
Associate III
June 10, 2022
Solved

HAL_TIM_PeriodElapsedCallback freezes when adding some content

I am getting desperate trying to solve this issue.

When I add some content to HAL_TIM_PeriodElapsedCallback the main loop gets frozen but still continue receiving call on HAL_TIM_PeriodElapsedCallback.

Could somebody help me out with this? I have been dealing with this issue for almost 3 days and don't know what could be the problem I have tried changing the priorities of the timers, prescales, moving functionality out of the timers IRQ handlers...

Thanks in advance.

This topic has been closed for replies.
RPG
RPGBest answer
Associate III
June 10, 2022

Never mind! Solved! It was a library imported from another project which was modifying the registers of one of the timers used on my project! It was driving me crazy... Thanks for the help anyway :)

4 replies

waclawek.jan
Super User
June 10, 2022

Try decreasing the interrupt rate, i.e. increase (significantly - 10x or even more) TIMx_ARR or TIMx_PSC.

JW

RPG
RPGAuthor
Associate III
June 10, 2022

I tried by x10, x100 and x1000 and same thing. :(

RPG
RPGAuthor
Associate III
June 10, 2022

Have also tried with several combinations changing the priority but nothing.

RPG
RPGAuthorBest answer
Associate III
June 10, 2022

Never mind! Solved! It was a library imported from another project which was modifying the registers of one of the timers used on my project! It was driving me crazy... Thanks for the help anyway :)