Content originally posted in LPCWare by R2D2 on Tue Feb 24 05:06:42 MST 2015
Quote: Wilbur He
...
LPC_PINCON->PINSEL4 = 1 << 2; //P2.1 works as PWM1.2 output.pin43,MR2
LPC_PINCON->PINSEL4 = 1 << 4; //P2.2 works as PWM1.3 output.pin44,MR3
LPC_PINCON->PINMODE4 = 1 << 5; //enable P2.2,MR3 neither pull up nor pull down.
LPC_PINCON->PINMODE4 = 1 << 3; //enable P2.1,MR2 neither pull up nor pull down.
...
Of course that's nonsense, you are setting your registers twice, deleting the last setting ;-)