HAL_Delay blocks the entire program
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-20 12:54 PM
Hello everyone. I have a big problem with my custom STM32H7 board, in particular with HAL_Delay.
When I add a line on my main.c file to simply print on SWV, the first time seems to work, but after it does not work anymore. It prints the first time, and after it seems stuck in HAL_Delay indefinitely.. Could someone help me debug this issue? I'll put the .ioc file below,
Thanks in advance.
- Labels:
-
STM32H7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-20 1:12 PM
Is SysTick or whatever you've selected as the timing source started? After HAL_Init()?
Look at which TIM or SysTick was started?
Check Handler enabled in NVIC
Check IRQHandler is used, and calling HAL_IncTick()
Use some basic diagnostic and inspection methods.
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
‎2024-07-20 1:20 PM
Thank you for the fast response. Here's the NVIC configuration :
The Timebase source is SysTick
Here's my main.c file
I'm pretty new to this part of STM32, so I don't really know what to do exactly ahah
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-20 1:20 PM
Hi,
so you do something wrong.
Maybe set priority of HAL to low. Lower than ...whatever you call.
Very simple error...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-20 1:22 PM
Thank you for replying!
Is this HAL priority changeable on the NVIC configuration?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-20 1:25 PM
Sure...
So set it to higher (closer to 0 ) prio...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-20 1:52 PM
If you see the screenshot that i sent, it is already set to 0..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-20 2:20 PM
The lower the number, the higher the priority is.
Priority 0 is the highest priority. 15 would be the lowest priority.
TimerCallback tutorial! | UART and DMA Idle tutorial!
If you find my solution useful, please click the Accept as Solution so others see the solution.
