how to create create milli seconds delay function using timer in stm32cubeide using stm32f103c8t6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-15 1:21 AM
1 ACCEPTED SOLUTION
Accepted Solutions
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-15 1:47 AM
- set up a timer ARR and PSC so that timer_input_clock_period * (TIMx_PSC+1) * (TIMx_ARR+1) = required_time
- set TIMx_CR1.OPM = 1
- set TIMx_CR1.CEN = 1
- wait until TIMx_CR1.CEN = 0
JW
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-15 1:47 AM
- set up a timer ARR and PSC so that timer_input_clock_period * (TIMx_PSC+1) * (TIMx_ARR+1) = required_time
- set TIMx_CR1.OPM = 1
- set TIMx_CR1.CEN = 1
- wait until TIMx_CR1.CEN = 0
JW
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-15 2:08 AM
You mean +1 not -1 for times related to PSC and ARR values. =)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-15 3:35 AM
Indeed, thanks, I edited my post to avoid confusion.
JW
