Information
FTM counter
0 0 0
1 1 11 1
2 2 22 23 3 33 34 4 4
FTM counting is up-down
TOF bit
set TOF bit set TOF bit
period of FTM counter clock
period of counting = 2 x (MOD - CNTIN) x period of FTM counter clock
= 2 x MOD x period of FTM counter clock
CNTIN = 0x0000
MOD = 0x0004
Figure 37-171. Example of Up-Down Counting When CNTIN = 0x0000
Note
It is expected that the up-down counting be used only with
CNTIN = 0x0000.
37.4.3.3 Free Running Counter
If (FTMEN = 0) and (MOD = 0x0000 or MOD = 0xFFFF), the FTM counter is a free
running counter. In this case, the FTM counter runs free from 0x0000 through 0xFFFF
and the TOF bit is set when the FTM counter changes from 0xFFFF to 0x0000 (see the
following figure).
FTM counter
0x00040x0004
0xFFFE
0xFFFF
0x0003
0x0000
0x0001
0x0002 0x0003 0x0005 0x0006
TOF bit
... ... ...
FTMEN = 0
set TOF bit
MOD = 0x0000
Figure 37-172. Example When the FTM Counter Is a Free Running
If (FTMEN = 1), (QUADEN = 0), (CPWMS = 0), (CNTIN = 0x0000), and (MOD =
0xFFFF), the FTM counter is a free running counter. In this case, the FTM counter runs
free from 0x0000 through 0xFFFF and the TOF bit is set when the FTM counter changes
from 0xFFFF to 0x0000.
Functional Description
K10 Sub-Family Reference Manual, Rev. 6, Nov 2011
940 Freescale Semiconductor, Inc.
