12.3.3 Status and Control (FTMx_SC)
SC contains the overflow status flag and control bits used to configure the interrupt
enable, FTM configuration, clock source, and prescaler factor. These controls relate to all
channels within this module.
Address: Base a 0h offset
Bit
7
6
5
4
3
2
1
0
Read
Write
0
Reset
0
0
0
0
0
0
0
0
FTMx_SC field descriptions
Field
Description
7
TOF
Timer Overflow Flag
Set by hardware when the FTM counter passes the value in the Counter Modulo registers. The TOF bit is
cleared by reading the SC register while TOF is set and then writing a 0 to TOF bit. Writing a 1 to TOF has
no effect.
If another FTM overflow occurs between the read and write operations, the write operation has no effect;
therefore, TOF remains set indicating an overflow has occurred. In this case a TOF interrupt request is not
lost due to the clearing sequence for a previous TOF.
0
FTM counter has not overflowed.
1
FTM counter has overflowed.
6
TOIE
Timer Overflow Interrupt Enable
Enables FTM overflow interrupts.
0
Disable TOF interrupts. Use software polling.
1
Enable TOF interrupts. An interrupt is generated when TOF equals one.
5
CPWMS
Center-aligned PWM Select
Selects CPWM mode. This mode configures the FTM to operate in up-down counting mode.
0
FTM counter operates in up counting mode.
1
FTM counter operates in up-down counting mode.
4–3
CLKS
Clock Source Selection
Selects one of the three FTM counter clock sources.
00
No clock selected (this in effect disables the FTM counter).
01
System clock
10
Fixed frequency clock
11
External clock
PS
Prescale Factor Selection
Selects one of 8 division factors for the clock source selected by CLKS. The new prescaler factor affects
the clock source on the next system clock cycle after the new value is updated into the register bits.
Table continues on the next page...
Memory map and register definition
MC9S08PA4 Reference Manual, Rev. 5, 08/2017
238
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 ...