Counter High (Ftmx_Cnth) - NXP Semiconductors MC9S08SU16 Reference Manual

Table of Contents

Advertisement

Field
0
Disable TOF interrupts. Use software polling.
1
Enable TOF interrupts. An interrupt is generated when TOF equals one.
5
Center-aligned PWM Select
CPWMS
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
Clock Source Selection
CLKS
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.
000
Divide by 1
001
Divide by 2
010
Divide by 4
011
Divide by 8
100
Divide by 16
101
Divide by 32
110
Divide by 64
111
Divide by 128

19.4.4 Counter High (FTMx_CNTH)

The Counter registers contain the high and low bytes of the counter value. Reading either
byte latches the contents of both bytes into a buffer where they remain latched until the
other half is read. This allows coherent 16-bit reads in either big-endian or little-endian
order which makes this more friendly to various compiler implementations. The
coherency mechanism is automatically restarted by an MCU reset or any write to the
Status and Control register.
Writing any value to COUNT_H or COUNT_L updates the FTM counter with its initial
16-bit value (all zeroes) and resets the read coherency mechanism, regardless of the data
involved in the write.
When BDM is active, the FTM counter is frozen (this is the value that you may read); the
read coherency mechanism is frozen such that the buffer latches remain in the state they
were in when the BDM became active, even if one or both counter bytes are read while
NXP Semiconductors
FTMx_SC field descriptions (continued)
MC9S08SU16 Reference Manual, Rev. 5, 4/2017
Chapter 19 FlexTimer Module (FTM)
Description
323

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mc9s08su16vfkMc9s08su8vfk

Table of Contents