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-17 7:22 AM
I tried that, also created whole new workspace not just the project. Will try with another STM32 when I get home
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-17 7:50 AM
Upload the schematic
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-18 12:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-18 2:04 AM
Can you share your code or IOC file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-18 2:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-18 2:25 AM - edited ‎2023-11-20 8:06 AM
I think yo need to set your Trigger event if you want TIM2 for something
i could not replicated your issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-18 2:32 AM
I set it to TIM7 where trigger is not needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-18 2:36 AM
Ok, sorry i can not replicated it. Can i ask why you want to use HAL_Delay()? i think timer functions are a better solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-18 3:06 AM
I will use timer functions and interupts now but it just bothers me that HAL_Delay() is not working when it should. I mostly need it to wait for temperature conversion with SPI communication which takes around 10ms
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-18 3:10 AM
Can you use DMA with GPIO_Callback, for SPI communication while you procces the conversion. BTW i looked at conversion function, try no to do a oneliner when you can use more for readability
