Forums

PWM6 on LPC2148 does not work

Started by c_budelmann June 12, 2008
Hi,

I'm using a Olimex LPC2148 board, and have a problem with the pwm
output on PWM6. PWM on all other channels works fine, only the pin 0.9
PWM6 does not work.

My code contains only the start up code, and the following lines:

PWMMR0 = 1023; // set upper edge value
PWMLER |= (1<<0); // latch value
PWMTCR |= (1<<0) | // counter enable
(1<<3); // PWM enable
PWMTC = 0; // reset counter
PWMPR = 0; // prescaler settings
PWMMCR = (1<<1); // reset on PWMMR0
PWMPCR = (1<<14); // enable PWM output 6
PWMMR6 = 512; // load value
PWMLER |= (1<<6); // latch value

But the pin remains low. I've looked for all write operations to
PINSEL0, but 0.9 is changed only in the lines above.

Cheers,

Christoph

An Engineer's Guide to the LPC2100 Series

Since yesterday I've also tried the LPC21x8 example code included in
the WinARM package. The PWM examples uses only PWM1 to PWM5, so I
added the setting of the PWMMR6 register. All other settings (PINSEL,
latch registers, etc.) for PWM6 are already made. But I had no
success, the output on PWM6 always remains low.

Has anyone an idea?

Thanks in advance

Christoph