Skip to main content
DNguy.18
Associate II
May 1, 2019
Question

HAL_Delay problem!!!!!

  • May 1, 2019
  • 3 replies
  • 1540 views

Hello everyone!!!

I get a problem with HAL_Delay function. When I use STM32CubeMX creat my simple project (blink a led with STM32F4 Discovery Kit) everything is OK with HAL_Delay() function.

But when I creat a same project without using STM32CubeMX, HAL_Delay() function seem not working. I don't know why.

Anyone can help me!! Thank you very much!!!!

This topic has been closed for replies.

3 replies

S.Ma
Principal
May 1, 2019

Make your own delay using basic timer and dependencies may decrease.

Tesla DeLorean
Guru
May 1, 2019

Make sure to initialize the SysTick interrupt and that the interrupt calls the HAL functions to advance the internal tick count.​

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
DNguy.18
DNguy.18Author
Associate II
May 1, 2019

I have created project by STM32CubeMX but I can't find SysTick interrupt but it is OK. I copy this code to Keil uVision5 and HAL_Delay() not working.

JObr
Associate II
May 4, 2019

You can put this to main.c, it works for me:

void SysTick_Handler(void) {
 HAL_IncTick();
}