Free Running Counter - NXP Semiconductors freescale KV4 Series Reference Manual

Table of Contents

Advertisement

FTM counting is up-down
CNTIN = 0x0000
MOD = 0x0004
FTM counter
TOF bit
period of FTM counter clock
Figure 39-172. Example of up-down counting when CNTIN = 0x0000
When CNTIN is different from zero in the up-down counting, a
valid CPWM signal is generated:
• if CnV > CNTIN, or
• if CnV = 0 or if CnV[15] = 1. In this case, 0% CPWM is
generated.

39.5.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
...
0x0003
FTM counter
TOF bit
Figure 39-173. Example when the FTM counter is free running
The FTM counter is also a free running counter when:
Freescale Semiconductor, Inc.
0
2
3
4
3
2
1
1
set TOF bit
period of counting = 2 x (MOD - CNTIN) x period of FTM counter clock
= 2 x MOD x period of FTM counter clock
Note
0x0004
...
0xFFFE 0xFFFF
0x0000 0x0001 0x0002 0x0003
set TOF bit
KV4x Reference Manual, Rev. 2, 02/2015
Preliminary
Chapter 39 FlexTimer Module (FTM)
0
2
3
4
3
2
0
1
1
set TOF bit
0x0004
2
3
4
1
0x0005 0x0006
...
953

Advertisement

Table of Contents
loading

Table of Contents