cancel
Showing results for 
Search instead for 
Did you mean: 

Debugger Stuck at HAL_GetTick() Function

Giridhara_Datta_G
Associate III

Hello STM32 community,

I'm encountering an issue with my STM32L562VET controller where the debugger gets stuck at the `HAL_GetTick()` function. When debugging, the program seems to halt at this point, making it difficult to proceed with the debugging process effectively.

Additionally, I've noticed that when using EXTI1_IRQn or EXTI8_IRQn interrupts, the debugger fails to display the location of the current line being executed. This lack of visibility into the code execution flow hampers my debugging efforts even further.

It's worth mentioning that I'm using TZEN = 0 configuration. I've tried troubleshooting this problem by checking my interrupt configurations and ensuring that all necessary initialization steps are correctly implemented. However, I haven't been able to resolve the issue.

Has anyone else in the community encountered similar problems with debugging on STM32L562VET controllers with TZEN = 0 configuration? If so, I would greatly appreciate any insights, suggestions, or solutions you might have to offer.

Thank you in advance for your assistance.

Best regards,
Giridhara Datta G

1 ACCEPTED SOLUTION

Accepted Solutions

You should also ensure that the vector table is getting set correctly in system_stm32l5xx.c. Ensure the line that defines USER_VECT_TAB_ADDRESS is uncommented.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

4 REPLIES 4
Giridhara_Datta_G
Associate III

'HAL_Delay()' is used inside the function 'ADS131A0xInit()'

TDK
Guru

HAL_GetTick is not blocking, doesn't make sense that it would get stuck there.

Perhaps it's getting stuck within HAL_Delay? In which case you would want to ensure interrupts are enabled and that the systick interrupt is higher priority than wherever you're using HAL_Delay.

Look at the call stack when it's stuck to gain more insight into what code is causing the issue. Likely it's not HAL_GetTick, but a couple functions up from that.

 

If you feel a post has answered your question, please click "Accept as Solution".

You should also ensure that the vector table is getting set correctly in system_stm32l5xx.c. Ensure the line that defines USER_VECT_TAB_ADDRESS is uncommented.

If you feel a post has answered your question, please click "Accept as Solution".
Giridhara_Datta_G
Associate III

Hey @TDK  ,

Thanks a ton for the helpful solution! Uncommenting the definition of  USER_VECT_TAB_ADDRESS helped. I'm new to this. I truly appreciate you taking the time to respond.