cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_TIM_PeriodElapsedCallback freezes when adding some content

RPG
Senior

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.

1 ACCEPTED SOLUTION

Accepted Solutions
RPG
Senior

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 :)

View solution in original post

4 REPLIES 4

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

JW

RPG
Senior

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

RPG
Senior

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

RPG
Senior

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 :)