Not very sure about how the NXP LPCxxxx timer works ? Well, so do I =)
But after working with few of LPCxxxx series, I finally can get a good view of how the Timer works. Here’s a block diagram of how the Timer works (at least in LPC23xx, LPC24xx, LPC31xx, LPC32xx, LPC111x, LPC176x)
Note how each registers (CCR, CRx, MATx, MCR, etc) are matched to the block diagram functions.
In new LPCxxxx MCUs, the PWM (single edged PWM) is mux-ed with EMR functions. Hence, NXP added PWMC register to control which block (PWM or EMR) that controls the MATx pins.
So, how does the PWM block differs from EMR block ? Well, in PWM block, when TC = 0, the MATx pin will always toggled to LOW (VSS). In EMR block, it’s not.
Here’s some illustration of PWM using EMR:
Here’s illustration of PWM using PWM block: