FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1
20
Freescale Semiconductor, Inc.
Firmware Functions
•
Power Management:
This function executes entirely in RUN mode.
•
Interrupt Management:
This function does not await interrupts. It is not affected by interrupts
either.
•
Resources:
UUMA.
•
Input Parameters:
— UINT16 *u16AccelX: Updated 9-bit compensated acceleration.
— UINT16 *u16UUMA: Pointer to Universal Uncompensated Measurement Array (as described
). Uncompensated voltage, temperature and X-axis acceleration will be taken
from this array.
•
Returns
:
— UINT8 u8Status: Valid error flags/outputs are described in
3.2.11
UINT8 TPMS_READ_ACCELERATION_Z(UINT16 *u16UUMA, UINT8
u8Avg, UINT8 u8FiltSelect, UINT8 u8DynamicOffset)
•
Description:
Performs an uncompensated 10-bit measurement. While waiting for the ADC to
converge, this function goes into STOP4. If the ADC, for an unexpected reason, fails to converge,
this function has a built-in time-out: After five continuous non-ADC interrupts, the function will
assume a failed ADC reading, flag it accordingly, and exit. If the LVWF (Low Voltage Warning
Flag) hardware bit is set, it will flag it accordingly as well.
— If the ADC value is over or under the normal operating condition, the “acceleration error”
status flag will be set. The expected acceleration result will be forced to either “0” or “1023.”
(rail high or rail low).
— If the ADC times out with no result, the “ADC error” status flag will be set.
•
Stack size:
31 bytes
•
Approx. Duration:
2901 usec (500-Hz filter, 1 reading), 4255 usec (250-Hz filter, 1 reading).
•
Power Management:
This function requires the core to be configured for STOP4 mode and
running at full bus speed.
Table 16. Valid output conditions for TPMS_COMP_ACCELERATION_X
u8Status Value
Measurement Value
Condition
$01
$01FE
Compensated acceleration reading outside of valid range (high).
$01
$0001
Compensated acceleration reading outside of valid range (low).
$21
$01FE
Compensated pressure reading outside of valid range (high), and
uncompensated voltage suspected to be below valid operating
range for this function.
$21
$0001
Compensated pressure reading outside of valid range (low), and
uncompensated voltage suspected to be under below operating
range for this function.
$20
Between $0001 - $01FE
Uncompensated voltage suspected to be below valid operating
range for this function; The compensated reading is not guaranteed
for accuracy.
$00
Between $0001 - $01FE
Valid compensated acceleration reading.