function code for delay us & ms without using timer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-08 11:25 PM
i want implement us delay Delay_us(uint32_t time) function in my application without using timer Hal_Delay() function minimum delay 1ms how can i generate us delay?
Solved! Go to Solution.
- Labels:
-
STM32Cube MCU Packages
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-09 6:58 AM
You can use a TIM->CNT register clocking at a high rate to observe time pass
The cores, except CM0, have a 32-bit DWT CYCCNT register clocking at core frequency, which has a resolution of several nano-seconds, and can be used for sub-microsecond accuracy.
Search the forum, this topic has been gone over repetitively.
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
‎2019-05-09 6:58 AM
You can use a TIM->CNT register clocking at a high rate to observe time pass
The cores, except CM0, have a 32-bit DWT CYCCNT register clocking at core frequency, which has a resolution of several nano-seconds, and can be used for sub-microsecond accuracy.
Search the forum, this topic has been gone over repetitively.
Up vote any posts that you find helpful, it shows what's working..
