In output compare mode, the FTM can generate timed pulses with programmableposition, polarity, duration, and frequency. When the counter matches the value in theCnVH: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 channeloutput 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 thechannel (n) match (FTM counter = CnVH:CnVL).TOF bit...... 0 1 1 12 23 34 45 50 0previous valueprevious valuechannel (n) outputcounteroverflowcounteroverflowcounteroverflowchannel (n)matchchannel (n)matchCNTH:LMODH:L = 0x0005CnVH:L = 0x0003CHnF bitFigure 19-8. Example of the output compare mode when the match toggles the channeloutputTOF bit...... 0 1 1 12 23 34 45 50 0previous valueprevious valuechannel (n) outputcounteroverflowcounteroverflowcounteroverflowchannel (n)matchchannel (n)matchCNTH:LMODH:L = 0x0005CnVH:L = 0x0003CHnF bitFigure 19-9. Example of the output compare mode when the match clears the channeloutputchannel (n) outputCHnF bitTOF bitCNTH:LMODH:L = 0x0005CnVH:L = 0x0003counteroverflowchannel (n)match counteroverflow channel (n)matchcounteroverflow... 0 1 2 3 4 5 0 1 2 3 4 5 0 1 ...previous valueprevious valueFigure 19-10. Example of the output compare mode when the match sets the channeloutputFunctional DescriptionMC9S08SU16 Reference Manual, Rev. 5, 4/2017334 NXP Semiconductors