LPC17xx PWM duty cycle of zero

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC17xx PWM duty cycle of zero

702 Views
CraigMcQueen
Contributor III

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.

Labels (1)
0 Kudos
1 Reply

421 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Craig McQueen,

The output will keep constant low if the match value is 0, I'd highly recommend that you can create a simple testing demo and upload it, then I can replicate the issue on my site.

I'm looking forward to your reply.

Have a great day,
Ping

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos