2024-02-24 06:05 AM
Hi,
I am looking for a delay function for 1 us, HAL_Delay provides 1 ms, is there one in HAL or somewhere else?
Regards
Chao
Solved! Go to Solution.
2024-02-24 06:10 AM
Hello @Chao
HAL_Delay is able to provide minimum 1 ms delay, but when it comes to microseconds, there isn’t any predefined function to create 1 us delay in HAL Library. You have to create your own function. You can do that using a Timer for example you can refer to this post.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-02-24 06:10 AM
Hello @Chao
HAL_Delay is able to provide minimum 1 ms delay, but when it comes to microseconds, there isn’t any predefined function to create 1 us delay in HAL Library. You have to create your own function. You can do that using a Timer for example you can refer to this post.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-02-24 06:22 AM - edited 2024-02-24 06:23 AM
Actually HAL_Delay (as implemented) cannot even do a 1 ms delay... but one can provide better implementations.