2023-04-16 03:53 AM - edited 2023-11-20 08:04 AM
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:
And that is about it
2023-04-16 04:31 AM
where you call hal-delay? in INT ? you give all ints same (highest) priority 0 , so Systick cannot be called from same level. -> set tim2 2 , i2c..3 or so.
2023-04-16 04:32 AM
I call it in main function. I will try setting priority and will get back to you
2023-04-16 04:35 AM - edited 2023-11-20 08:04 AM
I changed it like so and it still gets stuck at HAL_delay(10);
2023-04-16 04:58 AM - edited 2023-11-20 08:04 AM
ok, in main should be no problem anyway.
try: not jump in/on hal-delay() , set cursor one or more lines after the line with delay and use run -> run to line
2023-04-16 05:07 AM
Cant even run the program that way. But when I debugg it doesn't go past the delay
2023-04-16 05:36 AM - edited 2023-11-20 08:04 AM
just..why not use the hse ?? (and pllm /2)
+
is program running when just run/start in debug? (and stop with suspend/pause )
2023-04-16 06:10 AM
I tried it with hsi, still not working. Yes, it seems like its running fine but cant really check because the live expression values are not showing for some reason. Also, do I need to do anything in the code to enable delay? I havent done anything, just tried to use it with hal_delay()
2023-04-16 06:24 AM
HAL_Delay(310); -- should just work. (but not: HAL_delay(10); ! d -> D !
if you have correct function call, just go in editor on the word with mouse cursor, you see in popup window the definition. if nothing shows up - wrong.
see on compile also every warning !!! only zero is good ->
<<15:23:20 Build Finished. 0 errors, 0 warnings. (took 3s.872ms) >>
2023-04-16 06:28 AM - edited 2023-11-20 08:04 AM
There is a declaration but it has been autogenerated, i didnt do it. I also have 9 warrning but only for unused variables later in the code. I tried 310 and also hal_delay(350), nothing works