English
Language : 

PXS20RM Datasheet, PDF (452/1368 Pages) Freescale Semiconductor, Inc – PXS20 Microcontroller
Enhanced Motor Control Timer (eTimer)
LENGTH - Count Length
This bit determines whether the counter counts to the compare value and then re-initializes itself to the
value specified in the LOAD, CMPLD1, or CMPLD2 registers, or the counter continues counting past
the compare value, to the binary roll over.
1 = Count until compare, then reinitialize.
The value that the counter is reinitialized with depends on the settings of CLC1 and CLC2. If
neither of these indicates the counter is to be loaded from one of the CMPLD registers, then the
LOAD register is used to reinitialize the counter upon matching either COMP register. If one
of CLC1 or CLC2 indicates that the counter is to be loaded from one of the CMPLD registers,
then the counter will reinitialize to the value in the appropriate CMPLD register upon a match
with the appropriate COMP register. If both of the CLC1 and CLC2 fields indicate that the
counter is to be loaded from the CMPLD registers, then CMPLD1 will have priority if both
compares happen at the same value.
When output mode $4 is used, alternating values of COMP1 and COMP2 are used to generate
successful comparisons. For example, the counter counts until COMP1 value is reached,
re-initializes, then counts until COMP2 value is reached, re-initializes, then counts until
COMP1 value is reached, etc.
0 = Continue counting to roll over.
DIR - Count Direction
This bit selects either the normal count direction up, or the reverse direction, down.
1 = Count down
0 = Count up
SECSRC - Secondary Count Source
These bits identify the source to be used as a count command or timer command. The selected input
can trigger the timer to capture the current value of the CNTR register. The selected input can also be
used to specify the count direction. The polarity of the signal can be inverted by the SIPS bit of the
CTRL2 register.
Table 20-5. Secondary Count Source Values
Value
00000
00001
00010
00011
00100
00101
00110
00111
01000
01001
Meaning
Counter #0 input pin
Counter #1 input pin
Counter #2 input pin
Counter #3 input pin
Counter #4 input pin
Counter #5 input pin
Reserved
Reserved
Auxiliary input #0 pin
Auxiliary input #1 pin
20-10
PXS20 Microcontroller Reference Manual, Rev. 1
Freescale Semiconductor