lpcware

lpc1313 / lpcopen pwm

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by TM1990 on Sun May 11 11:13:31 MST 2014
Hello,

I am trying to get a 20 kHz PWM Signal with lpcopen working.
But I am stuck at one general point.

I would do it like this:

Chip_TIMER_Init(LPC_TIMER16_0);
Chip_TIMER_ExtMatchControlSet(LPC_TIMER16_0, 0,TIMER_EXTMATCH_SET,0);
Chip_TIMER_Enable(LPC_TIMER16_0);

Chip_TIMER_SetMatch(LPC_TIMER16_0, 0, 32768); // 50/50 PWM

Then I should get a PWM but it will run with 72 MHz and will overrun at 65536. So i will only get a frequency about 1 kHz
How can I set an upper limit without the match value to reduce the time for an overrun?

Outcomes