MPC563XM Reference Manual, Rev. 1
Freescale Semiconductor
687
Preliminary—Subject to Change Without Notice
22.5.1.1.16
Center Aligned Output PWM Buffered with Dead-Time (OPWMCB) Mode
This operation mode generates a center aligned PWM with dead time insertion to the leading
(MODE[0:6]=10111b1) or trailing edge (MODE[0:6]=10111b0). A1 and B1 registers are double buffered
to allow smooth output signal generation when changing A2 or B2 registers values on the fly.
BSL[0:1] bits select the time base. The time base selected for a channel configured to OPWMCB mode
should be a channel configured to MCB Up/Down mode, as shown in
start the MCB channel time base after the OPWMCB mode is entered in order to avoid missing A matches
at the very first duty cycle.
Register A1 contains the ideal duty cycle for the PWM signal and is compared with the selected time base.
Register B1 contains the dead time value and is compared against the internal counter. For a leading edge
dead time insertion, the output PWM duty cycle is equal to the difference between register A1 and register
B1, and for a trailing edge dead time insertion, the output PWM duty cycle is equal to the sum of register
A1 and register B1. Mode[6] bit selects between trailing and leading dead time insertion, respectively.
NOTE
The internal counter runs in the internal prescaler ratio, while the selected
time base may be running in a different prescaler ratio.
When OPWMCB mode is entered, coming out from GPIO mode, the output flip-flop is set to the
complement of the EDPOL bit in the EMIOSC[n] register.
The following basic steps summarize proper OPWMCB startup, assuming the channels are initially in
GPIO mode:
1.
[global]
Disable Global Prescaler.
2.
[MCB channel]
Disable Channel Prescaler.
3.
[MCB channel]
Write $1 at internal counter.
4.
[MCB channel]
Set A register.
5.
[MCB channel]
Set channel to MCB Up mode.
6.
[MCB channel]
Set prescaler ratio.
7.
[MCB channel]
Enable Channel Prescaler.
8.
[OPWMCB channel]
Disable Channel Prescaler.
9.
[OPWMCB channel]
Set A register.
10.
[OPWMCB channel]
Set B register.
11.
[OPWMCB channel]
Select time base input through BSL[1:0] bits.
12.
[OPWMCB channel]
Enter OPWMCB mode.
13.
[OPWMCB channel]
Set prescaler ratio.
14.
[OPWMCB channel]
Enable Channel Prescaler.
15.
[global]
Enable Global Prescaler.
describes the load of A1 and B1 registers which occurs when the selected counter bus
transitions from $2 to $1. This event defines the cycle boundary. Note that values written to A2 or B2
within cycle
n
are loaded into A1 or B1 registers, respectively, and used to generate matches in cycle
n+1
.