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-17 07:22 AM
I tried that, also created whole new workspace not just the project. Will try with another STM32 when I get home
2023-04-17 07:50 AM
Upload the schematic
2023-04-18 12:36 AM
2023-04-18 02:04 AM
Can you share your code or IOC file?
2023-04-18 02:05 AM
2023-04-18 02:25 AM - edited 2023-11-20 08:06 AM
I think yo need to set your Trigger event if you want TIM2 for something
i could not replicated your issue
2023-04-18 02:32 AM
I set it to TIM7 where trigger is not needed.
2023-04-18 02: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.
2023-04-18 03: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
2023-04-18 03: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