cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_Delay

DYann.1
Senior II

Hello,

I tried the Hal_Delay function but it's not work Do you have any idea for this error ?

0693W00000aITvBQAW.pngAnd my code still waits at this loop :

0693W00000aITvqQAG.pngThank you for your helps

Regards

26 REPLIES 26

Most likely, interrupts are disabled. Call __enable_irq() in main() before HAL_delay().

If you don't know what you are doing, start from some ready, simple example project for your board.

If the MCU is clocking at 110 MHz, that's 110,000,000 cycles per second, there are 110,000 cycles in 1ms (1 KHz), if the prescaled clock source is DIV8, that would be 13,750 cycles.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hello Tesla,

After your explanation I try to have 110 MHz, it's ok but I don't understand what do you mean prescaled clock source is DVI8 ? I have this configuration can you show me this prescaler on this picture please ?

0693W00000aIZ8KQAW.pngit seems to me that I have a prescaler of 55 to have 110 MHz.

Karl Yamashita
Lead III

You IOC file shows the System Tick at priority 7 when by default it is 0, though that is still probably not the problem.

Set a breakpoint at HAL_IncTick() and see if it gets called?

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.

After set a breakpoint in the function HAL_IncTick()

0693W00000aIeznQAC.pngit does not pass in this function, probably I have to write an additional code ?

About System Tick at priority 7, I left the default settings

baydı.1
Associate III

Hello, 

      Did you solve this issue? I have encountered same problem. Please indicate if you find the solution.

Thanks

UMP-Dan
Associate II

Anyone have a solution to this issue? I wish ST would address this problem

Thank you UMP-Dan, It also works for me. Best.