English
Language : 

K60P100M100SF2RM Datasheet, PDF (990/1809 Pages) Freescale Semiconductor, Inc – K60 Sub-Family Reference Manual
Functional Description
FTM counting is up-down
CNTIN = 0x0000
MOD = 0x0004
FTM counter
0 1 23432 10 1 2 3432 1 0 12 34
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
Figure 39-171. Example of Up-Down Counting When CNTIN = 0x0000
Note
It is expected that the up-down counting be used only with
CNTIN = 0x0000.
39.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).
FTMEN = 0
MOD = 0x0000
FTM counter ... 0x0003 0x0004 ... 0xFFFE 0xFFFF 0x0000 0x0001 0x0002 0x0003 0x0004 0x0005 0x0006 ...
TOF bit
set TOF bit
Figure 39-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.
K60 Sub-Family Reference Manual, Rev. 6, Nov 2011
990
Freescale Semiconductor, Inc.