LPC1227 half-bridge PWM with deadtime

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

LPC1227 half-bridge PWM with deadtime

257 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by usafape on Mon Jul 02 07:40:01 MST 2012
Hi all,

Can someone shine me a light if this can be done? If so, can you give me an example? I am trying to drive a synchronous buck converter from it and the PWM outputs are not coming out right. Here's my code:
//Setting up the output pins
LPC_IOCON->PIO2_4 |= 0x03;        // - set bit 1 to connect pin to CT32B0_MAT0
LPC_IOCON->PIO2_5 |= 0x03;        // - set bit 1 to connect pin to CT32B0_MAT1
    LPC_GPIO2->DIR     |= (1 << 4);        // - select OUTPUT
    LPC_GPIO2->DIR     |= (1 << 5);        // - select OUTPUT

    LPC_SYSCON->SYSAHBCLKCTRL |= (1 << 9); //Enable lock to TMR32B0

    LPC_CT32B0->MCR |= (1 << 10);

    LPC_CT32B0->MR0 = 1000;
    LPC_CT32B0->MR1 = 1500;
    LPC_CT32B0->MR1 = 2000;
    LPC_CT32B0->MR3 = 2500;

    LPC_CT32B0->PWMC |= (1 << 0);
    LPC_CT32B0->PWMC |= (1 << 1);

    LPC_CT32B0->TCR = 1;


Thanks for you help.
0 Kudos
2 Replies

202 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by usafape on Tue Jul 03 07:19:12 MST 2012
I want a two edge PWM. I will look into MPWM versions. I don't get why anyone would want a single edge PWM.

The control loop has to be fast enough for the bandwidth you need. You can make it work in the right application;)
0 Kudos

202 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Mon Jul 02 13:46:38 MST 2012
What is the behaviour that you are looking for?

"half bridge PWM with dead time" sounds like two PWM outputs with one output being high for a certain time, followed by a 'dead time' (no outputs high) and then the next PWM being high.

If that is the case, re-read your user manual for the timer operation. As I read it, the timer's PWM outputs are single edge PWMs. If you need double edge PWM signals the you might want to get an LPC1xxx variant that has a MCPWM block for motor control.

What do you want to do with the buck converter? You do realize that you need a  fast control loop to measure and adjust your PWM settings, otherwise your voltage will run away.

I tried to do something like this for high power LEDs but stopped my attempts after the first simulation runs.

Rob
0 Kudos