![NXP Semiconductors MPC5605BK Reference Manual Download Page 689](http://html.mh-extra.com/html/nxp-semiconductors/mpc5605bk/mpc5605bk_reference-manual_1721852689.webp)
Chapter 27 Timers
MPC5606BK Microcontroller Reference Manual, Rev. 2
Freescale Semiconductor
687
for a description of the A1 and B1 match generation. In this case A1 match has precedence
over B1 match and the output signal transitions to EDPOL.
27.4.4.1.1.10 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.
Bits BSL[0:1] 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. Bit Mode[6] 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 0x1 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.
Summary of Contents for MPC5605BK
Page 2: ...This page is intentionally left blank...
Page 20: ...MPC5606BK Microcontroller Reference Manual Rev 2 20 Freescale Semiconductor...
Page 103: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 103 Clocks and power...
Page 645: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 643 Timers...
Page 715: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 713 ADC system...
Page 787: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 787 Memory...
Page 893: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 893 Integrity...
Page 943: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 943 Debug...