timer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-14 8:33 AM
I am using NUCLEO-H743ZI2. I am trying timer to generate pulse using TIM_OCMODE_TOGGLE channel 1. my timer clock is 100MHz, I set pre-scaler as 9 and channel 1 pulse as 9 as well. It seems it is difficult to get pulse, except I add more count on channel 1. is it true?
- Labels:
-
STM32H7 Series
-
TIM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-14 2:59 PM
You have to set the respective CCRx register to below value you've set into ARR, otherwise there is no compare thus no toggling. Prescaler (PSC) has nothing to do with this fact, it only influences the output frequency of toggling.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-14 4:44 PM
To get a pulse, you need to set the period and the pulse value. For 50% duty cycle, set pulse = (period + 1) / 2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-15 12:11 AM
Just to avoid any confusion: TDK talks about PWM mode.
TOGGLE mode results always on 50% duty and half the frequency of timer's overflow frequency.
JW
