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 06:29 AM
could be some issue with HAL_GetTick?
2023-04-16 06:35 AM - edited 2023-11-20 08:05 AM
so this is the inside debug of delay:
it gets stuck at this while
2023-04-16 06:44 AM
Make sure SysTick_Handler() is calling HAL_IncTick(), that it's not weak, and that it is binding into the image.
Double check SCB->VTOR pointer to your Vector Table address, and that the interrupts aren't disabled.
2023-04-16 06:52 AM - edited 2023-11-20 08:05 AM
seems: sysclk not running ...because tickstart should not stay at 0.
should be so: (> 0)
2023-04-16 07:08 AM - edited 2023-11-20 08:05 AM
ok so this is systick:
and this is hal_gettick
2023-04-16 07:20 AM - edited 2023-11-20 08:05 AM
and in ***_it.c file you should have :
2023-04-16 08:33 AM
any idea how do i fix that ?
2023-04-16 08:38 AM
I tried creating a new projectg without any setup changes and tried running HAL_Delay(300); and it also got stuck
2023-04-16 09:30 AM
upload this project
2023-04-16 10:08 AM