TOF bit
CHnF bit
CNTH:L
channel (n) output
MODH:L = 0x0008
CnVH:L = 0x0005
counter
overflow
channel (n)
match
counter
overflow
...
0
1
2
3
4
5
6
7
8
0
1
2
...
previous value
Figure 12-12. EPWM signal with ELSnB:ELSnA = 1:0
If (ELSnB:ELSnA = X:1), then the channel (n) output is forced low at the counter
overflow, when the value of 0x0000 is loaded into the FTM counter. Additionally, it is
forced high at the channel (n) match, when the FTM counter = CnVH:L. See the
following figure.
TOF bit
CHnF bit
CNTH:L
channel (n) output
MODH:L = 0x0008
CnVH:L = 0x0005
counter
overflow
channel (n)
match
counter
overflow
...
0
1
2
3
4
5
6
7
8
0
1
2
...
previous value
Figure 12-13. EPWM signal with ELSnB:ELSnA = X:1
If (CnVH:L = 0x0000), then the channel (n) output is a 0% duty cycle EPWM signal and
CHnF bit is not set, even when there is the channel (n) match. If (CnVH:L > MODH:L),
then the channel (n) output is a 100% duty cycle EPWM signal and CHnF bit is not set,
even when there is the channel (n) match. Therefore, MODH:MODL must be less than
0xFFFF in order to get a 100% duty cycle EPWM signal.
12.4.7 Center-aligned PWM (CPWM) mode
The center-aligned mode is selected when:
• (CPWMS = 1)
The CPWM pulse width (duty cycle) is determined by 2 × (CnVH:L). The period is
determined by 2 × (MODH:L). See the following figure. MODH:L must be kept in the
range of 0x0001 to 0x7FFF because values outside this range can produce ambiguous
results.
In the CPWM mode, the FTM counter counts up until it reaches MODH:L and then
counts down until it reaches the value of 0x0000.
Functional Description
MC9S08PA4 Reference Manual, Rev. 5, 08/2017
252
NXP Semiconductors
Summary of Contents for MC9S08PA4
Page 1: ...MC9S08PA4 Reference Manual Supports MC9S08PA4 Document Number MC9S08PA4RM Rev 5 08 2017 ...
Page 2: ...MC9S08PA4 Reference Manual Rev 5 08 2017 2 NXP Semiconductors ...
Page 22: ...MC9S08PA4 Reference Manual Rev 5 08 2017 22 NXP Semiconductors ...
Page 28: ...System clock distribution MC9S08PA4 Reference Manual Rev 5 08 2017 28 NXP Semiconductors ...
Page 150: ...Port data registers MC9S08PA4 Reference Manual Rev 5 08 2017 150 NXP Semiconductors ...
Page 196: ...Human machine interfaces HMI MC9S08PA4 Reference Manual Rev 5 08 2017 196 NXP Semiconductors ...
Page 224: ...Instruction Set Summary MC9S08PA4 Reference Manual Rev 5 08 2017 224 NXP Semiconductors ...
Page 232: ...Functional Description MC9S08PA4 Reference Manual Rev 5 08 2017 232 NXP Semiconductors ...
Page 258: ...FTM Interrupts MC9S08PA4 Reference Manual Rev 5 08 2017 258 NXP Semiconductors ...
Page 294: ...Functional description MC9S08PA4 Reference Manual Rev 5 08 2017 294 NXP Semiconductors ...
Page 398: ...Resets MC9S08PA4 Reference Manual Rev 5 08 2017 398 NXP Semiconductors ...
Page 400: ...MC9S08PA4 Reference Manual Rev 5 08 2017 400 NXP Semiconductors ...