FTM counter
0
0
0
1
1
1
1
1
2
2
2
2
2
3
3
3
3
3
4
4
4
FTM counting is up-down
TOF bit
set TOF bit
set TOF bit
MODH:L = 0x0004
period of FTM counter clock
period of counting = 2 x MODH:L x period of FTM counter clock
Figure 12-5. Example of up-down counting
12.4.3.3 Free running counter
If (MODH:L = 0x0000 or MODH:L = 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
0x0004
0x0004
0xFFFE 0xFFFF
0x0003
0x0000 0x0001 0x0002 0x0003
0x0005 0x0006
TOF bit
...
...
...
set TOF bit
MODH:L = 0x0000
Figure 12-6. Example when the FTM counter is a free running
12.4.3.4 Counter reset
Any write to CNTH or CNTL register resets the FTM counter to the value of 0x0000 and
the channels output to its initial value, except for channels in output compare mode.
12.4.4 Input capture mode
The input capture mode is selected when (CPWMS = 0), (MSnB:MSnA = 0:0), and
(ELSnB:ELSnA ≠ 0:0).
Functional Description
MC9S08PA4 Reference Manual, Rev. 5, 08/2017
248
NXP Semiconductors
Содержание MC9S08PA4
Страница 1: ...MC9S08PA4 Reference Manual Supports MC9S08PA4 Document Number MC9S08PA4RM Rev 5 08 2017 ...
Страница 2: ...MC9S08PA4 Reference Manual Rev 5 08 2017 2 NXP Semiconductors ...
Страница 22: ...MC9S08PA4 Reference Manual Rev 5 08 2017 22 NXP Semiconductors ...
Страница 28: ...System clock distribution MC9S08PA4 Reference Manual Rev 5 08 2017 28 NXP Semiconductors ...
Страница 150: ...Port data registers MC9S08PA4 Reference Manual Rev 5 08 2017 150 NXP Semiconductors ...
Страница 196: ...Human machine interfaces HMI MC9S08PA4 Reference Manual Rev 5 08 2017 196 NXP Semiconductors ...
Страница 224: ...Instruction Set Summary MC9S08PA4 Reference Manual Rev 5 08 2017 224 NXP Semiconductors ...
Страница 232: ...Functional Description MC9S08PA4 Reference Manual Rev 5 08 2017 232 NXP Semiconductors ...
Страница 258: ...FTM Interrupts MC9S08PA4 Reference Manual Rev 5 08 2017 258 NXP Semiconductors ...
Страница 268: ...Initialization application information MC9S08PA4 Reference Manual Rev 5 08 2017 268 NXP Semiconductors ...
Страница 294: ...Functional description MC9S08PA4 Reference Manual Rev 5 08 2017 294 NXP Semiconductors ...
Страница 370: ...Memory map and register description MC9S08PA4 Reference Manual Rev 5 08 2017 370 NXP Semiconductors ...
Страница 398: ...Resets MC9S08PA4 Reference Manual Rev 5 08 2017 398 NXP Semiconductors ...
Страница 400: ...MC9S08PA4 Reference Manual Rev 5 08 2017 400 NXP Semiconductors ...