hal_delay() not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-16 3:53 AM - edited ‎2023-11-20 8: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
- Labels:
-
TIM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-16 6:29 AM
could be some issue with HAL_GetTick?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-16 6:35 AM - edited ‎2023-11-20 8:05 AM
so this is the inside debug of delay:
it gets stuck at this while
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-16 6: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.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-16 6:52 AM - edited ‎2023-11-20 8:05 AM
seems: sysclk not running ...because tickstart should not stay at 0.
should be so: (> 0)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-16 7:08 AM - edited ‎2023-11-20 8:05 AM
ok so this is systick:and this is hal_gettick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-16 7:20 AM - edited ‎2023-11-20 8:05 AM
and in ***_it.c file you should have :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-16 8:33 AM
any idea how do i fix that ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-16 8:38 AM
I tried creating a new projectg without any setup changes and tried running HAL_Delay(300); and it also got stuck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-16 9:30 AM
upload this project
TimerCallback tutorial! | UART and DMA Idle tutorial!
If you find my solution useful, please click the Accept as Solution so others see the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-16 10:08 AM
