
ENC_CTRL field descriptions (continued)
Field
Description
0
Watchdog timer interrupt is disabled
1
Watchdog timer interrupt is enabled
2
WDE
Watchdog Enable
This bit allows operation of the watchdog timer monitoring the PHASEA and PHASEB inputs for motor
movement.
0
Watchdog timer is disabled
1
Watchdog timer is enabled
1
CMPIRQ
Compare Interrupt Request
This bit is set when a match occurs between the counter and the COMP value. It will remain set until
cleared by software. Write a one to this bit to clear.
0
No match has occurred
1
COMP match has occurred
0
CMPIE
Compare Interrupt Enable
This read/write bit enables compare interrupts.
0
Compare interrupt is disabled
1
Compare interrupt is enabled
41.4.2 Input Filter Register (ENC_FILT)
This register sets the values of the input filter sample period (FILT_PER) and the input
filter sample count (FILT_CNT).
The FILT_PER value should be set such that the sampling period is larger than the period
of the expected noise. This way a noise spike will only corrupt one sample. The
FILT_CNT value should be chosen to reduce the probablility of noisy samples causing an
incorrect transition to be recognized. The probability of an incorrect transition is defined
as the probability of an incorrect sample raised to the power of F3.
The values of FILT_PER and FILT_CNT must also be traded off against the desire for
minimal latency in recognizing valid input transitions. Turning on the input filter (setting
FILT_PER to a non-zero value) introduces a latency of ((F3)*F2)
IPBus clock periods.
The filter latency can be measured as follows: drive the quadrature decoder inputs,
PHASEA, PHASEB, INDEX, and HOME monitoring the filtered output in the input
monitor register (IMR). Determine how many IPBus clock cycles it takes before the
output shows up, by using the following equations, where f is FILT_PER and s is
FILT_CNT.
1. DELAY (IPBus clock cycles) = f * (s+3) +1 (to read the filtered output)
Chapter 41 Quadrature Encoder/Decoder (ENC)
KV4x Reference Manual, Rev. 2, 02/2015
Freescale Semiconductor, Inc.
Preliminary
1049
Summary of Contents for freescale KV4 Series
Page 2: ...KV4x Reference Manual Rev 2 02 2015 2 Preliminary Freescale Semiconductor Inc...
Page 60: ...KV4x Reference Manual Rev 2 02 2015 60 Preliminary Freescale Semiconductor Inc...
Page 128: ...Debug Security KV4x Reference Manual Rev 2 02 2015 128 Preliminary Freescale Semiconductor Inc...
Page 138: ...Boot KV4x Reference Manual Rev 2 02 2015 138 Preliminary Freescale Semiconductor Inc...
Page 1358: ...KV4x Reference Manual Rev 2 02 2015 1358 Preliminary Freescale Semiconductor Inc...