Chapter 18. Pulse Width Modulation (PWM) Module
18-3
PWM Programming Model
18.3.1 PWM Control Register (PWCRn)
This register, shown in Figure 18-2, controls the overall operation of the PWM. Unless
disabled and then re-enabled, writing to PWCR while the PWM is running will not alter its
operation until the current output cycle finishes. For example, if the prescale value is
changed while the PWM is enabled, the new value will not take effect until after the counter
has “wrapped around”. The PWM must be disabled and then re-enabled to affect its
operation before the end of the current output cycle.
Figure 18-2. PWM Control Registers (PWCRn)
Table 18-2 gives PWCR field descriptions.
7
6
5
4
3
0
Field
EN
FRC1
LVL
—
CKSEL
Reset
0010_0000
R/W
Read/Write
Address
MBAR + 0x0C0 (PWCR0); + 0x0C4 (PWCR1); + 0x0C8 (PWCR2)
Table 18-2. PWCRn Field Descriptions
Bits
Name
Description
7
EN
Enable.
0 Disables the PWM. While disabled, the PWM is in low-power mode and the prescaler
does not count. When the PWM is disabled, the output is forced to the value of
PWCRn[LVL].
1 Enables the PWM.
6
FRC1
Force output high.
0 Default reset value. PWM functions normally.
1 The PWM drives the output high for the entire counter period. PWCRn[FRC1] has a
lower priority than PWCRn[EN], so setting PWCRn[FRC1] while PWCRn[EN] is
cleared has no effect. There are two ways to drive the PWM output high. If PWCRn[EN]
is cleared, PWM output immediately assumes the value of PWCRn[LVL]. If
PWCRn[FRC1] is set while PWCRn[EN] is set, the PWM output does not go high until
after the current output cycle completes.
5
LVL
Disable level. Determines the PWM output level whenever the PWM is disabled.
0 The PWM output is low while disabled.
1 The PWM output is high while disabled.
4
—
Reserved, should be cleared.
3–0
CKSL
Prescale clock. These bits select the clock frequency divider, that is, the output of the
divider chain, as shown below.
CKSL[3:0] Divisor
0000
1
0001
2
0010
4
...
...
1111
32768
Содержание DigitalDNA ColdFire MCF5272
Страница 1: ...MCF5272UM D Rev 0 02 2001 MCF5272 ColdFire Integrated Microprocessor User s Manual ...
Страница 38: ...xxxviii MCF5272 User s Manual TABLES Table Number Title Page Number ...
Страница 58: ...1 10 MCF5272 User s Manual MCF5272 Specific Features ...
Страница 90: ...2 42 MCF5272 User s Manual Exception Processing Overview ...
Страница 96: ...3 6 MCF5272 User s Manual MAC Instruction Execution Timings ...
Страница 158: ...5 46 MCF5272 User s Manual Motorola Recommended BDM Pinout ...
Страница 184: ...7 12 MCF5272 User s Manual Interrupt Controller Registers ...
Страница 338: ...13 44 MCF5272 User s Manual Application Examples ...
Страница 414: ...18 6 MCF5272 User s Manual PWM Programming Model ...
Страница 452: ...19 38 MCF5272 User s Manual Power Supply Pins ...
Страница 482: ...20 30 MCF5272 User s Manual Reset Operation ...
Страница 492: ...21 10 MCF5272 User s Manual Non IEEE 1149 1 Operation ...
Страница 548: ...INDEX Index 12 MCF5272 User s Manual ...