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
1
2
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)
MC9S08PT60 Reference Manual, Rev. 4, 08/2014
Freescale Semiconductor, Inc.
339
Содержание MC9S08PT60
Страница 2: ...MC9S08PT60 Reference Manual Rev 4 08 2014 2 Freescale Semiconductor Inc...
Страница 34: ...MC9S08PT60 Reference Manual Rev 4 08 2014 34 Freescale Semiconductor Inc...
Страница 40: ...System clock distribution MC9S08PT60 Reference Manual Rev 4 08 2014 40 Freescale Semiconductor Inc...
Страница 120: ...Flash and EEPROM registers descriptions MC9S08PT60 Reference Manual Rev 4 08 2014 120 Freescale Semiconductor Inc...
Страница 200: ...Port data registers MC9S08PT60 Reference Manual Rev 4 08 2014 200 Freescale Semiconductor Inc...
Страница 228: ...System clock gating control registers MC9S08PT60 Reference Manual Rev 4 08 2014 228 Freescale Semiconductor Inc...
Страница 262: ...Human machine interfaces HMI MC9S08PT60 Reference Manual Rev 4 08 2014 262 Freescale Semiconductor Inc...
Страница 298: ...Functional Description MC9S08PT60 Reference Manual Rev 4 08 2014 298 Freescale Semiconductor Inc...
Страница 396: ...FTM Interrupts MC9S08PT60 Reference Manual Rev 4 08 2014 396 Freescale Semiconductor Inc...
Страница 440: ...Functional description MC9S08PT60 Reference Manual Rev 4 08 2014 440 Freescale Semiconductor Inc...
Страница 468: ...Initialization Application Information MC9S08PT60 Reference Manual Rev 4 08 2014 468 Freescale Semiconductor Inc...
Страница 570: ...Application information MC9S08PT60 Reference Manual Rev 4 08 2014 570 Freescale Semiconductor Inc...
Страница 648: ...Memory map and register description MC9S08PT60 Reference Manual Rev 4 08 2014 648 Freescale Semiconductor Inc...
Страница 676: ...Resets MC9S08PT60 Reference Manual Rev 4 08 2014 676 Freescale Semiconductor Inc...