Datasheet

CNTINH:L = 0x0000
MODH:L = 0x0004
FTM counting is up
= (MODH:L + 0x0001) x period of FTM counter clock
TOF bit
3
4
0
0
1 12
2
3 3
4
4
0
1
2
FTM counter
set TOF bit
period of FTM counter clock
period of counting = (MODH:L - CNTINH:L + 0x0001) x period of FTM counter clock
set TOF bit
set TOF bit
Figure 12-189. Example of FTM up counting with CNTIN = 0x0000
Note
FTM operation is valid only when the value of the
CNTINH:L registers is less than the value of the MODH:L
registers, either in the unsigned counting or signed
counting.. Software must ensure that the values in the
CNTINH:L and MODH:L registers meet this requirement.
Any values of CNTINH:L and MODH:L that do not satisfy
this criteria can result in unpredictable behavior.
MODH:L = CNTINH:L is a redundant condition. In this
case, the FTM counter is always equal to MODH:L and the
TOF bit is set in each rising edge of the FTM counter
clock.
When MODH:L = 0x0000, CNTINH:L = 0x0000 (for
example after reset), and FTMEN = 1, the FTM counter
remains stopped at 0x0000 until a non-zero value is written
into the MODH:L or CNTINH:L registers.
Setting CNTINH:L to be greater than the value of
MODH:L is not recommended as this unusual setting may
make the FTM operation difficult to comprehend.
However, there is no restriction on this configuration, and
an example is shown in the following figure.
Chapter 12 FlexTimer Module (FTM)
MC9S08PA60 Reference Manual, Rev. 1, 9/2012
Freescale Semiconductor, Inc. 327