Skip to main content
PPopo.1
Senior
Apr 16, 2023 10:53 AM UTC
Question

hal_delay() not working

So I've created a project and am trying to use the HAL_delay(10); but it gets stuck at this function when im trying to debug.

I have been changing the clock and enabling the TIM2 so I don't know if i've messed something up. Here are the settings that I have:


_legacyfs_online_stmicro_images_0693W00000biAmBQAU.png
_legacyfs_online_stmicro_images_0693W00000biAmGQAU.png
_legacyfs_online_stmicro_images_0693W00000biAmVQAU.png
_legacyfs_online_stmicro_images_0693W00000biAmaQAE.png
_legacyfs_online_stmicro_images_0693W00000biAmfQAE.png 

And that is about it

This topic has been closed for replies.

54 replies

Karl Yamashita
Super User
Apr 17, 2023 2:50 PM UTC

Upload the schematic

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source
PPopo.1
PPopo.1Author
Senior
Apr 18, 2023 7:36 AM UTC
Associate
May 8, 2025 5:07 PM UTC

The debug is the problem. Systick stop working during a debug-session. Since my app is a single thread I replaced every HAL_Delay with a normal loop with some NOP() that made up a delay_1us()....

I haven't found a solution to this problem. To much work when it can be solved with a simple loop.