AnsweredAssumed Answered

LPC17xx PWM duty cycle of zero

Question asked by Craig McQueen on Nov 8, 2016
Latest reply on Nov 11, 2016 by jeremyzhou

I'm trying to use the PWM to drive a buzzer at a specified frequency. I am able to turn on the buzzer and control its frequency as expected, so that's fine.


Of course, I also want to be able to turn the buzzer off, and also ensure the output  is low so the drive transistor isn't left on. So, according to the LPC17xx User Manual, to ensure it outputs low (when in Single Edge mode), I should set the match value to 0. Manual section 24.4.1 says "All single edge controlled PWM outputs go high at the beginning of a PWM cycle
unless their match value is equal to 0." However, if I do that, then the output is left high, not low.


I've found that if I set the PWM channel's match value to equal to the MR0 value, then it does seem to stay low.


Is this correct use of the PWM? If so, the User Manual should be changed to clarify this point.