Skip to main content
Dsaba.2
Visitor II
November 12, 2021
Question

I am using the stm32g473mbt I generate a project with cube mx I only confirm the communication with the 5-pin jtag, from the main I read Systiks timer, with the library running_boot1 = HAL_GetTick (); i the reading is always 0

  • November 12, 2021
  • 2 replies
  • 703 views

..

This topic has been closed for replies.

2 replies

TDK
November 12, 2021

If SysTick isn't being called, perhaps you have interrupts disabled. Hard to know what's going on without any code.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Paul1
Senior III
November 12, 2021

Has this function been generated by MX: SysTick_Handler()

It calls HAL_IncTick() which is the counter returned by HAL_GetTick()

Should be enabled in MX:

  • Pinout & Config > System Core > NVIC > NVIC > Time base > Ensure its enabled
  • Pinout & Config > System Core > NVIC > Code Generation > Time base > Ensure [Generate IRQ Handler] and [Call HAL handler] are enabled
  • If they aren't all enabled try to figure out how that happened, as I think these are enabled by default in new projects.

Paul