Chapter 25 FlexPWM
MPC5602P Microcontroller Reference Manual, Rev. 4
658
Freescale Semiconductor
NOTE
The INIT register is buffered. The value written does not take effect until the
LDOK bit is set and the next PWM load cycle begins. This register cannot
be written when LDOK is set. Reading INIT reads the value in a buffer and
not necessarily the value the PWM generator is currently using.
25.6.3.3
Control 2 Register (CTRL2)
Address: Base + 0x0004 (Submodule 0)
Base + 0x0054 (Submodule 1)
Base + 0x00A4 (Submodule 2)
Base + 0x00F4 (Submodule 3)
Access: User read/write
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
R
DBG
EN
WAIT
EN
IN
DEP
PWM
A_
INIT
PWM
B_
INIT
PWM
X_
INIT
INIT_SEL
FRC
EN
0
FORCE_SEL
REL
OAD
_SEL
CLK_SEL
W
FOR
CE
Reset
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Figure 25-5. Control 2 Register (CTRL2)
Table 25-3. CTRL2 field descriptions
Field
Description
0
DBGEN
Debug Enable
When this bit is set, the PWM will continue to run while the device is in debug mode. If the device
enters debug mode and this bit is cleared, then the PWM outputs are disabled until debug mode is
exited. At that point, the PWM pins resume operation as programmed in the PWM registers.
For certain types of motors (such as 3-phase AC), it is imperative that this bit be left in its default
state (in which the PWM is disabled in debug mode). Failure to do so could result in damage to the
motor or inverter. For other types of motors (such as DC motors), this bit might safely be set,
enabling the PWM in debug mode. The key point is that PWM parameter updates will not occur in
debug mode. Any motors requiring such updates should be disabled during debug mode. If in doubt,
leave this bit cleared.
1
WAITEN
WAIT Enable
When this bit is set, the PWM continues to run while the device is in WAIT/HALT mode. In this mode,
the peripheral clock continues to run, but the CPU clock does not. If the device enters WAIT/HALT
mode and this bit is cleared, then the PWM outputs are disabled until WAIT/HALT mode is exited.
At that point, the PWM pins resume operation as programmed in the PWM registers.
For certain types of motors (such as 3-phase AC), it is imperative that this bit be left in its default
state (in which the PWM is disabled in WAIT/HALT mode). Failure to do so could result in damage
to the motor or inverter. For other types of motors (such as DC motors), this bit might safely be set,
enabling the PWM in WAIT/HALT mode. The key point is PWM parameter updates will not occur in
this mode. Any motors requiring such updates should be disabled during WAIT/HALT mode. If in
doubt, leave this bit cleared.
2
INDEP
Independent or Complementary Pair Operation
This bit determines whether the PWMA and PWMB channels will be independent PWMs or a
complementary PWM pair.
0 PWMA and PWMB form a complementary PWM pair.
1 PWMA and PWMB outputs are independent PWMs.