TIMER (Duty and OCActive)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2012-07-11 6:46 AM
Posted on July 11, 2012 at 15:46
Hi,
I would like to know why in TIM_OCMode_PWM1, I can calculate the frequency 'Duty cicle' TIM_CLK / (TIM_Period + 1) 36MHz/(999+1) Frequencia = -------------------------------- Logo, ------------------ = 18KHz (TIM_Prescaler + 1) (1+1) (see attached file) And in TIM_OCMode_Timing the period was set with 65535???? 'OCActive' (see attached file) #stm32-duty-cicle-ocactive-pulse
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2012-07-12 11:32 AM
Posted on July 12, 2012 at 20:32
Because presumably using the maximal 16-bit counter value makes advancing the CCR at each CC interrupt profoundly easier to do, and doesn't require any modulo math using slow divide instructions. And issues with CC/Update interrupts.
By advancing the CCR you can generate a far wider range of frequencies than you can with the integer divider methods.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2012-07-13 11:04 AM
Posted on July 13, 2012 at 20:04
THANKS clive1
