PWM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-02-10 4:06 AM
Posted on February 10, 2011 at 13:06
PWM
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
‎2011-05-17 5:24 AM
Posted on May 17, 2011 at 14:24
but what do I need to do - to set the output to a constant level ( Low or High ) ?
You could always drive it as a GPIO. I haven't tried the 0, n-1 or n settings, are you seeing a pulse?
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
‎2011-05-17 5:24 AM
Posted on May 17, 2011 at 14:24
clive1++:
At pwm value = 0 no pulses, the output line stays low (or high, if inverted). At value = max (0xFFFF) short pulses are present. The idea: 1. Init pwm GPIO output register to the state you need at pwm = max. 2. Switch pwm GPIO to AFIO to use it as pwm output. 3. As soon as the pwm value must be max, switch pwm output to GPIO - you got the output steady. Else (pwm value < max) switch pwm output back to AFIO and enjoy the pulses. 4. Do 3). in the match interrupt of the pwm channel (suggestion).