Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] PWM glitch

2004-08-20 by Bill Knight

The LPC manual indicates the (two) bits in PWMLER should be written
at the same time.  Possibly the first bit written to the PWMLER
is being cleared when the second bit is written?

Regards
-Bill Knight
theARMPatch


On Fri, 20 Aug 2004 03:44:21 -0000, douglasbolton wrote:

I'm running 4 pwm channels in single edge operation. I am sometimes 
not getting the shadow register latched into the match registers. If 
I use the following code I sometimes get a glitch where the latch 
register doesn't cause the the value to get loaded into the match 
register.

void LPC210xSetPwm1(uint16_t PwmValue)

 PWMMR1 = PwmValue;	
 PWMLER = 0x0002;	


void LPC210xSetPwm2(uint16_t PwmValue)

 PWMMR2 = PwmValue;
 PWMLER = 0x0004;	


etc

If I use the following code to latch all 4 pwm shadow registers 
instead of individual I never get a glitch.

void LPC210xSetPwm1(uint16_t PwmValue)

 PWMMR1 = PwmValue;	
 PWMLER = 0x002e;	


void LPC210xSetPwm2(uint16_t PwmValue)

 PWMMR2 = PwmValue;
 PWMLER = 0x002e;	


etc

Has anybody had similiar problems or got and explanation. 

regards Doug





Yahoo! Groups Links

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.