Skip to main content
DAgui.3
Visitor II
August 26, 2023
Question

HAL_GetTick always returns 0 for STM32G431CBT6

  • August 26, 2023
  • 3 replies
  • 3384 views

I've been trying to use the Hal_Delay function and found it not working. Looking into it, it appears that the sysTick interrupt is not going off to increment the count. Any ideas what is causing this? Is it possible that the interrupt vector is set up wrong? I've tried making sure that interrupts are enabled and that systick is set on highest priority, still nothing. Any help is appreciated

This topic has been closed for replies.

3 replies

TDK
August 26, 2023

Interrupts are probably turned off and/or you're in a higher/same priority interrupt.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Associate II
November 26, 2024

Thank you for this. 

Incase anybody needs this. I had some issues initializing my sdram and somehow the function keeps getting stuck at HAL_GetTick(); , and the function returns 0. Turns out that my interrupt setting in the Time base: TIM6 global interrupt was set to 15. After changing it to a higher priority which is 4. My problem is solved and I am finally able to see my LCD screen. Just a back note, TIM6 was used for my M7 processor. 

Board: STM32H745I-DISCO

Stm32CubeIDE ver: 1.16.1

TouchGFX ver: 4.24.1

ST Technical Moderator
September 21, 2023

Hello @DAgui.3,

Could you share your SW setup? IOC file ? 

It is possible that the timeout has increased in your application. Could you share a minimum project to reproduce the issue?

@Pavel A. unfortunately your post was mistakenly misplaced.

 

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL