C28x eQEP
Quadrature encoder pulse block used to derive position, direction, and speed
Libraries:
C2000 Microcontroller Blockset /
C2803x
C2000 Microcontroller Blockset /
C2805x
C2000 Microcontroller Blockset /
C2806x
C2000 Microcontroller Blockset /
C280x
C2000 Microcontroller Blockset /
C2833x
C2000 Microcontroller Blockset /
C2834x
C2000 Microcontroller Blockset /
F280013x
C2000 Microcontroller Blockset /
F280015x
C2000 Microcontroller Blockset /
F28002x
C2000 Microcontroller Blockset /
F28003x
C2000 Microcontroller Blockset /
F28004x
C2000 Microcontroller Blockset /
F2807x
C2000 Microcontroller Blockset /
F2837xD
C2000 Microcontroller Blockset /
F2837xS
C2000 Microcontroller Blockset /
F2838x /
C28x
C2000 Microcontroller Blockset /
F28M35x /
C28x
C2000 Microcontroller Blockset /
F28M36x /
C28x
C2000 Microcontroller Blockset /
F28p65x
C2000 Microcontroller Blockset /
F28p55x
Description
The enhanced quadrature encoder pulse (eQEP) block is used along with a linear or rotary incremental encoder to get position, direction, and speed information from a rotating machine.
The eQEP peripheral module inputs include QEPA, QEPB, QEPI (index), and QEPS (strobe).
To configure your device to work with the block, navigate to Model Configuration Parameters > Hardware Implementation, select your device at Hardware board, and expand Target hardware resources.
Examples
Field-Oriented Control of PMSM with Quadrature Encoder Using C2000 Processors
Implements the field-oriented control (FOC) technique to control the speed of a three-phase permanent magnet synchronous motor (PMSM). The FOC algorithm requires rotor position feedback, which is obtained by a quadrature encoder sensor. For details about FOC, see Field-Oriented Control (FOC) (Motor Control Blockset).
Schedule a Multi-Rate Controller for a Permanent Magnet Synchronous Machine
Create a real-time executable for a Texas Instruments™ F28335 embedded target. You will build upon the algorithm specified in the example Field-Oriented Control of Permanent Magnet Synchronous Machine (Embedded Coder) by adding timing and peripheral specifications. You will learn an advanced technique to schedule the algorithm based on the periodic end-of-conversion event of the ADC.
Ports
Input
swi — Dynamically update initialization value for position counter
scalar
If the input is true
, the position counter is
initialized to the value in the Initialization value
(0~4294967295) parameter.
Dependencies
This port appears only when, in the Position
counter tab, you select Enable
software initialization and set Software
initialization source to Input
port
.
Data Types: Boolean
cmp — Value for comparing position
scalar
Input value that generates the position compare sync signal.
Dependencies
This port appears only when, in the Compare
output tab, you select Enable
position-compare sync signal output and set
Compare value source to
Input port
.
Data Types: int8
| uint8
| int16
| uint16
| int32
| uint32
| single
| double
| Boolean
iel — Software index marker
scalar
Software index event marker for latching the position counter.
Dependencies
This port appears only when, in the Position counter tab:
You set Position counter reset mode to
Reset on the maximum position
orReset on the first index event
.You select Output latch position counter on index event.
You set Index event latch of position counter to
Software index marker via input port
.
Note
In Compare output tab, if
Sync output pin selection is set
to Index pin is used for sync output
,
then the Index event latch of position
counter parameter cannot be set to
Software index marker via input
port
.
Data Types: Boolean
Output
qposcnt — Position counter signal
scalar
Position counter signal (PCSOUT) received from the position counter and control unit (PCCU).
Dependencies
This port appears only when, in the Position counter tab, you select Output position counter.
Data Types: int8
| uint8
| int16
| uint16
| int32
| uint32
| single
| double
| Boolean
pcef — Position counter error flag on error
scalar
Outputs the position counter error flag on an error.
0
— No error occurred during the last index transition.1
— Position counter error.
Dependencies
This port appears only when, in the Position counter tab:
You set Position counter reset mode to
Reset on an index event
.You select Output position counter error flag.
Data Types: int8
| uint8
| int16
| uint16
| int32
| uint32
| single
| double
| Boolean
qdf — Direction flag of quadrature module
scalar
Direction flag of the quadrature module.
0
— counterclockwise rotation (or reverse movement).1
— clockwise rotation (or forward movement).
Dependencies
This port appears only when, in the General tab, you select Quadrature direction flag output port.
Data Types: int8
| uint8
| int16
| uint16
| int32
| uint32
| single
| double
| Boolean
qctmr — Capture timer signal
scalar
Outputs the eQEP capture timer signal.
Dependencies
This port appears only when, in the Speed calculation tab, you select Enable eQEP capture and Output capture timer.
Data Types: int8
| uint8
| int16
| uint16
| int32
| uint32
| single
| double
| Boolean
qcprd — Capture period signal
scalar
Outputs the capture period signal, which holds the period count value between the last successive eQEP position events.
Dependencies
This port appears only when, in the Speed calculation tab, you select Enable eQEP capture and Output capture period timer.
Data Types: int8
| uint8
| int16
| uint16
| int32
| uint32
| single
| double
| Boolean
coef — eQEP overflow error flag
scalar
Outputs overflow error flag (COEF flag) in the event of capture timer overflow between unit position events.
0
— Overflow has not occurred.1
— Overflow occurred in the eQEP capture timer register (QEPCTMR).
Dependencies
This port appears only when, in the Speed calculation tab, you select Enable eQEP capture and Enable and output overflow error flag.
Data Types: int8
| uint8
| int16
| uint16
| int32
| uint32
| single
| double
| Boolean
cdef — Direction change error flag
scalar
Outputs the direction change error flag.
0
— Capture direction error has not occurred.1
— Direction change occurred between two capture position events.
Dependencies
This port appears only when, in the Speed calculation tab, you select Enable eQEP capture and Enable and output direction change error flag.
Data Types: int8
| uint8
| int16
| uint16
| int32
| uint32
| single
| double
| Boolean
qctmrlat — Capture timer latched value
scalar
Outputs the capture timer latched value from the QCTMRLAT register.
Dependencies
This port appears only when, in the Speed calculation tab, you select Enable eQEP capture and Output capture timer latched value.
Data Types: int8
| uint8
| int16
| uint16
| int32
| uint32
| single
| double
| Boolean
qcprdlat — Capture timer period latched value
scalar
Outputs the capture timer period latched value from the QCPRDLAT register.
Dependencies
This port appears only when, in the Speed calculation tab, you select Enable eQEP capture and Output capture timer period latched value.
Data Types: int8
| uint8
| int16
| uint16
| int32
| uint32
| single
| double
| Boolean
qposlat — Position counter latched value
scalar
Outputs position counter latched value from the QPOSLAT register.
Dependencies
This port appears only when, in the Speed calculation tab, you select Enable eQEP capture and Output position counter latched value.
Data Types: int8
| uint8
| int16
| uint16
| int32
| uint32
| single
| double
| Boolean
qposilat — Latches position counter on index event
scalar
eQEP index input can be configured to latch the position counter register (QPOSCNT) as output on the occurrence of a definite event on this pin.
Dependencies
This port appears only when, in the Position counter tab:
You set Position counter reset mode to
Reset on the maximum position
orReset on the first index event
.You select Output latch position counter on index event.
Data Types: int8
| uint8
| int16
| uint16
| int32
| uint32
| single
| double
| Boolean
qposslat — Latches position counter on strobe event
scalar
eQEP strobe input can be configured to latch the position counter register (QPOSCNT) as output on the occurrence of a definite event on this pin.
Dependencies
This port appears only when, in the Position counter tab:
You set Position counter reset mode to
Reset on the maximum position
orReset on the first index event
.You select Output latch position counter on strobe event.
Data Types: int8
| uint8
| int16
| uint16
| int32
| uint32
| single
| double
| Boolean
Parameters
General
Module — eQEP module to obtain position, direction, and speed
eQEP1
(default) | eQEP2
| eQEP3
The eQEP peripheral module used to obtain position, direction, and speed information. The number of eQEP modules supported varies for different C2000™ processors.
Position counter mode — Mode that matches how input to eQEP peripheral is encoded
Quadrature-count
(default) | Direction-count
| Up-count
| Down-count
The eQEP peripheral inputs are QEPA, QEPB, QEPI, and QEPS. Configure the GPIO pins for these inputs by navigating to Configuration Parameters > Hardware Implementation > Target hardware resources > eQEP.
Input signals QEPA and QEPB to the eQEP peripheral are processed by the quadrature decoder unit (QDU) in the eQEP peripheral to produce clock (QCLK) and direction (QDIR) signals. Choose the position counter mode that matches the way the input to the eQEP module is encoded:
Quadrature-count
— Two square signals (A and B) 90 degrees out of phase are sent to the eQEP peripheral. The QDU uses the phase relationship of these two inputs to generate quadrature clock and direction signals.Direction-count
— Direction and clock signals are directly sent to the eQEP peripheral. The QEPA pin provides the clock input, and the QEPB pin provides the direction input.Up-count
— The position counter is used to measure the frequency of the signal in the QEPA pin. The direction is hard-wired for up count in this mode.Down-count
— The position counter is used to measure the frequency of the signal in the QEPA pin. The direction is hard-wired for down count in this mode.
Positive rotation — Direction of rotation
Clockwise
(default) | Counterclockwise
Set the direction of rotation.
If Clockwise
is selected, the quadrature
count operation is performed without swapping the quadrature clock
inputs fed to the QDU.
If Counterclockwise
is selected, reverse
counting is performed by swapping the quadrature clock inputs fed to the
QDU. The quadrature decoder reverses the counting direction.
Dependencies
This parameter appears only when you set Position
counter mode to
Quadrature-count
on the
General tab.
External clock rate — Measurement resolution
2x resolution: Count the rising/falling
edge
(default) | 1x resolution: Count the rising edge
only
Select the resolution of the clock generator that the position counter uses as input so that the counting occurs on both rising and falling edges of the QEPA input or on the rising edge only. Choosing the former increases the measurement resolution by a factor of 2.
Dependencies
This parameter appears only when you set Position
counter mode to
Direction-count
,
Up-count
, or
Down-count
.
Quadrature direction flag output port — Creates port for direction flag
off
(default) | on
Creates a port (qdf) on the block that gives the direction flag of the quadrature module.
Dependencies
This parameter appears only when, in the
General tab, Position
counter mode is set to
Quadrature-count
.
Invert input QEPxX polarity — Inverts polarity of eQEP input
off
(default) | on
Inverts the polarity of the eQEP peripheral inputs. The Invert input QEPxA polarity checkbox corresponds to QEPA, Invert input QEPxB polairty corresponds to QEPB, and so on.
Index pulse gating option — Enables gating of index pulse with strobe input
off
(default) | on
Enables the gating of the peripheral input index signal with the peripheral input strobe signal. In this case, the internal index signal is high only when both the peripheral input signals eQEPxI and eQEPxS are high.
Sample time — Frequency at which block reads position counter
0.0001
(default) | -1
| scalar
Sample time for the block in seconds. To execute this block
asynchronously, set this parameter to -1
.
Position counter
Output position counter — Outputs position counter signal
on
(default) | off
Outputs the position counter signal PCSOUT from the position counter and control unit (PCCU). The position counter register counts up or down on every eQEP pulse based on the direction of the input. The count value is proportional to the position from a given reference point.
Maximum position counter value (0~4294967295) — Specifies maximum position counter value
4294967295
(default) | integer in [0, 4,294,967,295]
Enter a maximum value (QPOSMAX) for the position counter. If the
position counter reaches QPOSMAX, the position counter is set to
0
on the next increment of the counter. If the
position counter is 0
, the position counter is set to
QPOSMAX on the next decrement of the counter.
Enable set to init value on index event — Enables option to set initialization value for position counter
off
(default) | on
Enables option to set the position counter to its initialization value on an index event.
Set to init value on index event — Initialization value for position counter
Rising edge
(default) | Falling edge
Sets the position counter to its initialization value on the rising edge or falling edge of the index event.
Dependencies
This parameter appears only when, in the Position counter tab, you select Enable set to init value on index event.
Enable set to init value on strobe event — Enables option to set initialization value for position counter
off
(default) | on
Enables option to set the position counter to its initialization value on a strobe event.
Set to init value on strobe event — Sets initialization value for position counter
Rising edge
(default) | Depending on direction
The Rising edge
option sets the position
counter to its initialization value on the rising edge of the strobe
input. The Depending on direction
option sets
the position counter to its initialization value on the:
rising edge of the strobe input, in the forward direction.
falling edge of the strobe input, in the reverse direction.
Dependencies
This parameter appears only when, in the Position counter tab, you select Enable set to init value on strobe event.
Enable software initialization — Enables option to set initialization value for position counter
off
(default) | on
Allows the position counter to be set to its initialization value using the software.
Software initialization source — Specifies initialization source of position counter
Input port
(default) | Set to init value at start up
Choose the Set to init value at start up
option to initialize the position counter to the value entered in
Initialization value at the start of the
execution of the program. Choose the Input
port
option to update the initialization value
dynamically based on an input initialization signal (input port
swi). If the input
swi is true
, the
position counter is initialized to the Initialization
value.
Dependencies
This parameter appears only when, in the Position counter tab, you select Enable software initialization.
Initialization value (0~4294967295) — Initialization value for position counter
2147483648
| integer in [0, 4,294,967,295]
Enter the initialization value for the position counter.
Dependencies
This parameter appears only when you select Enable set to init value on index event, Enable set to init value on strobe event, or Enable software initialization.
Position counter reset mode — Resets position counter
Reset on an index
event
(default) | Reset on the maximum position
| Reset on the first index event
| Reset on a time unit event
Position counter reset mode, depending on the nature of the system the eQEP module is working with.
Reset on an index event
— If the index event occurs during the forward direction, then the position counter is reset to 0 on the next eQEP clock. If the index event occurs during the reverse direction, then the position counter is reset to the value in the QPOSMAX register on the next eQEP clock.Reset on the maximum position
— During the forward direction, when the position counter is equal to QPOSMAX, the position counter is reset to 0 on the next eQEP clock, and the position counter overflow flag is set. During the reverse direction, when the position counter is equal to 0, the position counter is reset to QPOSMAX on the next QEP clock, and the position counter underflow flag is set.Reset on the first index event
— If the index event occurs during the forward direction, the position counter is reset to 0 on the next eQEP clock. If the index event occurs during the reverse direction, the position counter is reset to the value in the QPOSMAX register on the next eQEP clock. The position counter is reset using theReset on the first index event
option only on the first index event occurrence. After the first index event occurrence, the position counter is reset based on the maximum position.Reset on a unit time event
— The QPOSCNT value is latched to the QPOSLAT register on a unit time event. The QPOSCNT register is then reset to 0 for the forward direction and QPOSMAX for the reverse direction. You can use this option for frequency measurement.
Output position counter error flag — Outputs position counter error flag on error
off
(default) | on
Outputs the position counter error flag on error. When you select this option, the output port pcef is created.
Dependencies
This parameter appears only when, in the Position
counter tab, you set Position counter
reset mode to Reset on an index
event
.
Output latch position counter on index event — Latches position counter on index event
off
(default) | on
When this option is enabled, the position counter QPOSCNT latches into QPOSLAT on the occurrence of an event on the strobe pin.
Dependencies
This parameter appears only when, in the Position
counter tab, you set Position counter
reset mode to Reset on the maximum
position
or Reset on the first index
event
.
Index event latch of position counter — Configures position counter to latch on an event
Rising edge
(default) | Falling edge
| Software index marker via input
port
Configures the eQEP position counter to latch on the index event selected.
Dependencies
This parameter appears only when, in the Position counter tab:
You set Position counter reset mode to
Reset on the maximum position
orReset on the first index event
.You select Output latch position counter on index event.
Output latch position counter on strobe event — Latches position counter on strobe event
off
(default) | on
The eQEP strobe input can be configured to latch the position counter (QPOSCNT) into QPOSSLAT on occurrence of a definite event on this pin. This option latches the position counter on each strobe event.
Dependencies
This parameter appears only when, in the Position
counter tab, you set Position counter
reset mode to Reset on the maximum
position
or Reset on the first index
event
.
Strobe event of latched position counter — Configures position counter to latch on strobe
Rising edge
(default) | Depending on direction
Rising edge
latches on the rising edge of
the strobe event input. Depending on
direction
latches on the rising edge in the forward
direction and the falling edge in the reverse direction.
Dependencies
This parameter appears only when, in the Position counter tab:
You set Position counter reset mode to
Reset on the maximum position
orReset on the first index event
.You select Output latch position counter on strobe event.
Speed calculation
To view the other parameters of this tab, select the Enable QEP capture option.
Enable QEP capture — Enables edge capture unit
off
(default) | on
The eQEP peripheral includes an integrated edge capture unit to measure the elapsed time between the unit position events. This option enables the edge capture unit.
Output capture timer — Outputs capture timer
off
(default) | on
Outputs the capture timer value from the QCTMR register.
Output capture period timer — Outputs capture period
off
(default) | on
Outputs the period count value between the last successive eQEP position events from the QCPRD register.
eQEP capture timer prescaler — Prescales capture timer clock frequency
128
(default) | 1
| 2
| 4
| 8
| 16
| 32
| 64
The eQEP capture timer runs from prescaled SYSCLKOUT. The capture timer clock frequency is the frequency of SYSCLKOUT divided by the value you choose for this parameter.
Unit position event prescaler — Prescales quadrature clock
128
(default) | 1
| 2
| 4
| 8
| 16
| 32
| 64
| 256
| 512
| 1024
| 2048
The timing of the unit position event is determined by prescaling the quadrature clock (QCLK). QCLK is divided by the prescalar value you choose for this parameter.
Enable and output overflow error flag — Outputs overflow error flag when capture timer overflows
off
(default) | on
Enables and outputs the eQEP overflow error flag (COEF) in the event of capture timer overflow between unit position events.
Enable and output direction change error flag — Outputs direction change error flag
off
(default) | on
Enables and outputs the direction change error flag (CDEF) when direction change occurs between the unit position events.
Capture timer and position — QEP capture latch mode
On position counter
read
(default) | On unit time-out event
Event that triggers the latching of the capture timer and capture period register:
On position counter read
— Latch on position counter read by the processor. The capture timer and capture period values are latched into the QCTMRLAT and QCPRDLAT registers when the processor reads the QPOSCNT register.On unit time-out event
— Latch on unit time-out. The position counter, capture timer, and capture period values are latched into the QPOSLAT, QCTMRLAT, and QCPRDLAT registers on unit time-out.
Unit timer period (0~4294967295) — Sets unit timer period
100000000
(default) | value in the range [0, 4,294,967,295]
Set the unit timer period.
Dependencies
This parameter appears only when you set Capture timer
and position to On unit time-out
event
.
Output capture timer latched value — Outputs capture timer latched value
off
(default) | on
Outputs the capture timer latched value from the QCTMRLAT register at the output port qctmrlat.
Output capture timer period latched value — Outputs capture timer period latched value
off
(default) | on
Outputs the capture timer period latched value from the QCPRDLAT register at the output port qcprdlat.
Output position counter latched value — Outputs position counter latched value
off
(default) | on
Outputs the position counter latched value from the QPOSLAT register at the output port qposlat.
Compare output
To view the other parameters of this tab, select the Enable position-compare sync signal output option.
Enable position-compare sync signal output — Enables position compare sync signal output
off
(default) | on
The eQEP peripheral includes a position compare unit that generates the position compare sync signal when the position counter register (QPOSCNT) and the position compare register (QPOSCMP) values match. This option enables the position compare sync signal output. The sync signal can be output using an index pin or strobe pin of the eQEP peripheral.
Sync output pin selection — GPIO pin used for sync signal
Index pin is used for sync
output
(default) | Strobe pin is used for sync output
The GPIO pin used for the sync signal output. Use the index pin or strobe pin of the eQEP peripheral to output the position compare sync signal.
Compare value source — Source of value for position comparison
Specify via dialog
(default) | Input port
Source of the value to be used for the position compare register
(QPOSCMP). When this parameter is set to Input
port
the input port cmp is
created.
Position compare shadow load mode — Shadow mode for generating position compare sync signal
Load on QPOSCNT=0
(default) | Shadow disabled(load immediate)
| Load on QPOSCNT=QPOSCMP
This parameter lets you enable or disable shadow mode for updating the position compare (QPOSCMP) register. When shadow mode is enabled, you can also choose an event to trigger the loading of the shadow register value into the active register. When shadow mode is disabled, the processor directly loads the value into the active register.
Load on QPOSCNT=0
loads on a position
counter zero event, and Load on
QPOSCNT=QPOSCMP
loads when the QPOSCNT and QPOSCMP
values match. When you select these options, shadow mode is
enabled.
Position compare value (0~4294967295) — Value for comparing postiton
4294967295
(default) | value in the range [0, 4,294,967,295]
This value is loaded into the position compare register (QPOSCMP).
Dependencies
This parameter appears only when you set Compare value
source to Specify via
dialog
.
Sync output pulse width (1~4096) — Pulse width of position compare sync output signal
1
(default) | value in the range [0, 4,096]
The pulse stretcher logic in the position compare unit generates a programmable position compare sync pulse output on the position compare match.
A value from 1
to 4096
that
determines the pulse width of the position compare sync output signal.
The width of the output pulse, measured in SYSCKOUT cycles, is four
times the entered value.
Polarity of sync output — Polarity of sync output
Active high
(default) | Active low
Select the polarity of the sync output signal generated.
Watchdog unit
Watchdog timer enable — Enables watchdog time-out flag
off
(default) | on
The eQEP peripheral contains a watchdog timer that monitors the quadrature clock to indicate that the motion-control system is operating. The timer is reset on an edge transition of the quadrature clock. The watchdog unit generates an interrupt, which you can enable in the Interrupt tab.
Watchdog timer — Time-out value for watchdog timer
65535
(default) | value in the range [0, 65,535]
The time period after which the watchdog unit generates an interrupt.
Dependencies
This parameter appears only when you select Watchdog timer enable.
Signal Data Types
When you select signals as output in the other tabs, the corresponding signals appear in this tab. For example, when you select the Output position counter option on the Position counter tab, the Position counter value data type option appears on this tab. Using this tab, you can select the data types of the signals.
The valid data types are auto
,
double
, single
,
int8
, uint8
,
int16
, uint16
,
int32
, uint32
, and
boolean
.
The following table summarizes the options for which you can set the data type in the Signal data types tab:
Pane | Option |
---|---|
General | Quadrature direction flag output port |
Position counter | Output position counter (selected by default) |
Output position counter error flag | |
Output latch position counter on index event | |
Output latch position counter on strobe event | |
Speed calculation | Output capture timer |
Output capture period timer | |
Enable and output overflow error flag | |
Enable and output direction change error flag | |
Output capture timer latched value | |
Output capture timer period latched value | |
Output position counter latched value |
Interrupt
Interrupts corresponding to specific events are enabled or disabled based on the settings in this tab. The generated interrupts are used with the C28x Hardware Interrupt.
Position counter error interrupt enable — Enables position counter error interrupts
off
(default) | on
Enables position counter error interrupts. The position counter interrupt is generated only in index event reset mode. When eQEP is configured in this mode, the position counter value is latched to the QPOSILAT register, and the direction information is recorded on every index event marker. If the latched value is not equal to 0 or QPOSMAX, the position counter error interrupt is generated.
Quadrature phase error interrupt enable — Enables quadrature phase error interrupts
off
(default) | on
Enables quadrature phase error interrupts. In quadrature count mode, the quadrature inputs QEPA and QEPB are expected to be 90 degrees out of phase. The quadrature phase error interrupt is generated when edge transition is detected simultaneously on the QEPA and QEPB signals.
Quadrature direction change interrupt enable — Enables quadrature direction change interrupt
off
(default) | on
When the direction of counting changes, the quadrature direction change interrupt is generated.
Watchdog timeout interrupt enable — Enables watchdog timeout interrupts
off
(default) | on
The eQEP peripheral contains a watchdog timer that monitors the quadrature clock. If no quadrature clock event is detected until the watchdog timer matches the watchdog period, time-out occurs and the watchdog timeout interrupt is generated.
Position counter underflow interrupt enable — Enables position counter underflow interrupts
off
(default) | on
Enables position counter underflow interrupts. In the reverse direction, if the position counter reaches 0, then the position counter is reset to QPOSMAX on the next QEP clock and the position counter underflow interrupt is generated.
Position counter overflow interrupt enable — Enables position counter overflow interrupts
off
(default) | on
Enables position counter overflow interrupts. In the forward direction, if the position counter reaches QPOSMAX, the position counter is reset to 0 on the next QEP clock, and the position counter overflow interrupt is generated.
Position-compare ready interrupt enable — Enables position compare ready interrupts
off
(default) | on
Enables position compare ready interrupts. When the position compare register is configured for shadow mode, the position compare ready interrupt is generated after the shadow register value is loaded into the active register.
Position-compare match interrupt enable — Enables position compare match interrupts
off
(default) | on
Enables position compare match interrupts. The position compare match interrupt is generated when the position counter value QPOSCNT matches with the active position compare register QPOSCMP.
Strobe event latch interrupt enable — Enables strobe event latch interrupts
off
(default) | on
Enables strobe event latch interrupts. The strobe event latch interrupt is generated when the position counter is latched to the QPOSSLAT register during a strobe event latch.
Index event latch interrupt enable — Enables index event latch interrupts
off
(default) | on
Enables index event latch interrupts. The strobe event latch interrupt is generated when the position counter is latched to the QPOSILAT register during an index event latch.
Unit timeout interrupt enable — Enables unit timeout interrupts
off
(default) | on
Enables unit timeout interrupts. The unit time-out interrupt is generated when the unit timer matches the unit period.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)