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
Содержание freescale KV4 Series
Страница 2: ...KV4x Reference Manual Rev 2 02 2015 2 Preliminary Freescale Semiconductor Inc...
Страница 60: ...KV4x Reference Manual Rev 2 02 2015 60 Preliminary Freescale Semiconductor Inc...
Страница 82: ...JTAG Controller Configuration KV4x Reference Manual Rev 2 02 2015 82 Preliminary Freescale Semiconductor Inc...
Страница 88: ...System Register file KV4x Reference Manual Rev 2 02 2015 88 Preliminary Freescale Semiconductor Inc...
Страница 128: ...Debug Security KV4x Reference Manual Rev 2 02 2015 128 Preliminary Freescale Semiconductor Inc...
Страница 138: ...Boot KV4x Reference Manual Rev 2 02 2015 138 Preliminary Freescale Semiconductor Inc...
Страница 150: ...Pinout diagrams KV4x Reference Manual Rev 2 02 2015 150 Preliminary Freescale Semiconductor Inc...
Страница 170: ...Functional description KV4x Reference Manual Rev 2 02 2015 170 Preliminary Freescale Semiconductor Inc...
Страница 212: ...Functional description KV4x Reference Manual Rev 2 02 2015 212 Preliminary Freescale Semiconductor Inc...
Страница 284: ...Functional description KV4x Reference Manual Rev 2 02 2015 284 Preliminary Freescale Semiconductor Inc...
Страница 294: ...Functional description KV4x Reference Manual Rev 2 02 2015 294 Preliminary Freescale Semiconductor Inc...
Страница 330: ...Functional description KV4x Reference Manual Rev 2 02 2015 330 Preliminary Freescale Semiconductor Inc...
Страница 450: ...Initialization application information KV4x Reference Manual Rev 2 02 2015 450 Preliminary Freescale Semiconductor Inc...
Страница 512: ...Interrupts and DMA Requests KV4x Reference Manual Rev 2 02 2015 512 Preliminary Freescale Semiconductor Inc...
Страница 520: ...Memory Map and Register Descriptions KV4x Reference Manual Rev 2 02 2015 520 Preliminary Freescale Semiconductor Inc...
Страница 580: ...Initialization Application information KV4x Reference Manual Rev 2 02 2015 580 Preliminary Freescale Semiconductor Inc...
Страница 660: ...Functional description KV4x Reference Manual Rev 2 02 2015 660 Preliminary Freescale Semiconductor Inc...
Страница 1038: ...Example configuration for chained timers KV4x Reference Manual Rev 2 02 2015 1038 Preliminary Freescale Semiconductor Inc...
Страница 1074: ...Functional description KV4x Reference Manual Rev 2 02 2015 1074 Preliminary Freescale Semiconductor Inc...
Страница 1168: ...Initialization application information KV4x Reference Manual Rev 2 02 2015 1168 Preliminary Freescale Semiconductor Inc...
Страница 1264: ...Initialization application information KV4x Reference Manual Rev 2 02 2015 1264 Preliminary Freescale Semiconductor Inc...
Страница 1336: ...Functional description KV4x Reference Manual Rev 2 02 2015 1336 Preliminary Freescale Semiconductor Inc...
Страница 1358: ...KV4x Reference Manual Rev 2 02 2015 1358 Preliminary Freescale Semiconductor Inc...