![NXP Semiconductors MC9S08PA4 Reference Manual Download Page 250](http://html1.mh-extra.com/html/nxp-semiconductors/mc9s08pa4/mc9s08pa4_reference-manual_1721838250.webp)
In output compare mode, the FTM can generate timed pulses with programmable
position, polarity, duration, and frequency. When the counter matches the value in the
CnVH:CnVL registers of an output compare channel, the channel (n) output can be set,
cleared, or toggled.
When a channel is initially configured to toggle mode, the previous value of the channel
output is held until the first output compare event occurs.
The CHnF bit is set and the channel (n) interrupt is generated (if CHnIE = 1) at the
channel (n) match (FTM counter = CnVH:CnVL).
TOF bit
...
...
0
1
1
1
2
2
3
3
4
4
5
5
0
0
previous value
previous value
channel (n) output
counter
overflow
counter
overflow
counter
overflow
channel (n)
match
channel (n)
match
CNTH:L
MODH:L = 0x0005
CnVH:L = 0x0003
CHnF bit
Figure 12-8. Example of the output compare mode when the match toggles the channel
output
TOF bit
...
...
0
1
1
1
2
2
3
3
4
4
5
5
0
0
previous value
previous value
channel (n) output
counter
overflow
counter
overflow
counter
overflow
channel (n)
match
channel (n)
match
CNTH:L
MODH:L = 0x0005
CnVH:L = 0x0003
CHnF bit
Figure 12-9. Example of the output compare mode when the match clears the channel
output
channel (n) output
CHnF bit
TOF bit
CNTH:L
MODH:L = 0x0005
CnVH:L = 0x0003
counter
overflow
channel (n)
match
counter
overflow
channel (n)
match
counter
overflow
...
0
1
2
3
4
5
0
1
2
3
4
5
0
1
...
previous value
previous value
Figure 12-10. Example of the output compare mode when the match sets the channel
output
Functional Description
MC9S08PA4 Reference Manual, Rev. 5, 08/2017
250
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 ...