cancel
Showing results for 
Search instead for 
Did you mean: 

hal_delay() not working

PPopo.1
Senior

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

52 REPLIES 52

and you have any other stm32 to test, nucleo or other board?

or is this your first stm32 ever ?

If you feel a post has answered your question, please click "Accept as Solution".

At the moment this is all I got, it's my first stm, yes

and debug/connect with ..stlinkV2 or ?


_legacyfs_online_stmicro_images_0693W00000biDWfQAM.png

If you feel a post has answered your question, please click "Accept as Solution".

stlink-v3 I would like to try if the chips clock is working, any idea how ?

stlink-v3 - ok.

have a scope ?

then in Cube set MCO (master clk out) active, and look with DSO on pin..xx .


_legacyfs_online_stmicro_images_0693W00000biDciQAE.png

If you feel a post has answered your question, please click "Accept as Solution".


_legacyfs_online_stmicro_images_0693W00000biDgkQAE.png
_legacyfs_online_stmicro_images_0693W00000biDguQAE.pngSo with this settings i should expect 10Mhz at PA8?

if sysclk 80M ...right.

If you feel a post has answered your question, please click "Accept as Solution".

sysclk is 80Mhz yes, but Im not sure how much can gpio handle so I just set it to 10Mhz to be sure it works

PPopo.1
Senior

@AScha.3​  It seems to be working fine, so I have no idea what could be the issue

>but Im not sure how much can gpio handle 

read in DS , p. 135 . depends on core voltage/speed setting , for high 11 ->


_legacyfs_online_stmicro_images_0693W00000biEBxQAM.png>I have no idea what could be the issue

me too.

try new project ? and leave everything, as it is, no modified settings.

If you feel a post has answered your question, please click "Accept as Solution".