Cmd
DEC_GET_SCALED_POSITION
DEC_GET_SCALED_POSITION_DIFFERENCE
Note - Causes to copy all Quadrature Decoder counter registers' contents to their corresponding
+
hold registers.
5.13.3
Detailed API Specification
The detailed functionality of all ioctl commands is explained in this section. The code examples
illustrate the ioctl commands usage.
5-506
Table 5-407. ioctl commands (Continued)
pParam, param
decoder_sEncScale*
decoder_sEncScale*
Targeting 56F8xxx Platform
Return
Description
Word32
Calculates an absolute position. It
returns a 32bit value where the
MSB part represents the number
of revolutions (equals to the con-
tent of the Revolution Register)
while the LSB part represents the
portion of the current revolution
scaled into the 16bit unsigned
data range. The
DEC_CALCULATE_SCALE_CO
EF command must be executed
prior to this command.
Note: the correct functionality
requires to fill the Initialization
Register by value 0x00000000
and to enable initialization of the
Position Counter by the INDEX
signal
(DEC_WRITE_INIT_STATE and
DEC_INDEX_TRIGGERED_INIT
commands) during the Quadra-
ture Decoder init phase. +
Word16
Returns the scaled relative posi-
tion (difference). The 16bit signed
value represents a range speci-
fied by the RevolutionScale. The
DEC_CALCULATE_SCALE_CO
EF command must be executed
prior to this command.
Note: this command recalculates
(scales) the content of the Posi-
tion Difference Counter Register
which is automatically cleared
when Position Register is read. +
FREESCALE SEMICONDUCTOR