Quadrature Encoder (QEI)
bool ROM_QEIErrorGet (uint32_t ui32Base)
void ROM_QEIIntClear (uint32_t ui32Base, uint32_t ui32IntFlags)
void ROM_QEIIntDisable (uint32_t ui32Base, uint32_t ui32IntFlags)
void ROM_QEIIntEnable (uint32_t ui32Base, uint32_t ui32IntFlags)
uint32_t ROM_QEIIntStatus (uint32_t ui32Base, bool bMasked)
uint32_t ROM_QEIPositionGet (uint32_t ui32Base)
void ROM_QEIPositionSet (uint32_t ui32Base, uint32_t ui32Position)
void ROM_QEIVelocityConfigure (uint32_t ui32Base, uint32_t ui32PreDiv, uint32_t
ui32Period)
void ROM_QEIVelocityDisable (uint32_t ui32Base)
void ROM_QEIVelocityEnable (uint32_t ui32Base)
uint32_t ROM_QEIVelocityGet (uint32_t ui32Base)
16.2.1 Function Documentation
16.2.1.1 ROM_QEIConfigure
Configures the quadrature encoder.
Prototype:
void
ROM_QEIConfigure(uint32_t ui32Base,
uint32_t ui32Config,
uint32_t ui32MaxPosition)
ROM Location:
ROM_APITABLE is an array of pointers located at 0x0100.0010.
ROM_QEITABLE is an array of pointers located at ROM_APITABLE[9].
ROM_QEIConfigure is a function pointer located at ROM_QEITABLE[3].
Parameters:
ui32Base is the base address of the quadrature encoder module.
ui32Config is the configuration for the quadrature encoder. See below for a description of this
parameter.
ui32MaxPosition specifies the maximum position value.
Description:
This will configure the operation of the quadrature encoder. The ui32Config parameter provides
the configuration of the encoder and is the logical OR of several values:
QEI_CONFIG_CAPTURE_A or QEI_CONFIG_CAPTURE_A_B to specify if edges on
channel A or on both channels A and B should be counted by the position integrator and
velocity accumulator.
QEI_CONFIG_NO_RESET or QEI_CONFIG_RESET_IDX to specify if the position inte-
grator should be reset when the index pulse is detected.
QEI_CONFIG_QUADRATURE or QEI_CONFIG_CLOCK_DIR to specify if quadrature sig-
nals are being provided on ChA and ChB, or if a direction signal and a clock are being
provided instead.
QEI_CONFIG_NO_SWAP or QEI_CONFIG_SWAP to specify if the signals provided on
ChA and ChB should be swapped before being processed.
176 April 8, 2013