Skip to main content
MGiov.2
Visitor II
April 27, 2021
Question

HAL_Delay not working

  • April 27, 2021
  • 2 replies
  • 728 views

hello, i´m using stm32f103c8t6 and cubeIDE to write a simple blink code. The program get stuck in the HAL_Delay call. I noticed that the program blocks in the second call of HAL_GetTick(void).

I tried adding this to stm32f1xx_it.c as suggested in other post in this forum:

void SysTick_Handler(void)
 
{
 
 
 /* USER CODE BEGIN SysTick_IRQn 0 */
 
 /* USER CODE END SysTick_IRQn 0 */
 
 
 HAL_IncTick();
 
 
 HAL_SYSTICK_IRQHandler();
 
 /* USER CODE BEGIN SysTick_IRQn 1 */
 
 
 /* USER CODE END SysTick_IRQn 1 */
 
}

but without results, any ideas to get this function to work proprerly?

This topic has been closed for replies.

2 replies

Javier1
Principal
April 28, 2021

are you calling hal_delay() inside an interruption by any chance?

hit me up in https://www.linkedin.com/in/javiermuñoz/
andy2399
Senior
April 28, 2021

Is the SysTick timer enabled ?

Andy