![Freescale Semiconductor FXTH87 11 Series Firmware User Manual Download Page 13](http://html.mh-extra.com/html/freescale-semiconductor/fxth87-11-series/fxth87-11-series_firmware-user-manual_2330494013.webp)
Firmware Functions
FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1
Freescale Semiconductor, Inc.
13
3.2.3
UINT8 TPMS_COMP_VOLTAGE(UINT8 *u8CompVoltage, *UINT16
u16UUMA)
•
Description:
Performs an 8-bit compensated voltage measurement. It is the user’s responsibility
to ensure that updated and valid uncompensated voltage reading is available in the UUMA for this
routine to return a meaningful value.
— If Vout < 2.1 V, u8Voltage will be 1 and the “over/underflow” status flag will be set.
— Measurements below 2.1 V are not guaranteed for accuracy.
— If Vout
3.7 V, result will be $FE and the “over/underflow” status flag will be set.
— For repeatability data, refer to the FXTH87xxxx family of data sheets.
•
Stack size:
31 bytes
•
Approx. Duration:
204 usec
•
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:
— UINT8 *u8Voltage: Updated 8-bit compensated voltage result.
— UINT16 *u16UUMA: Pointer to Universal Uncompensated Measurement Array (as described
). Uncompensated voltage will be utilized from this array.
•
Returns
:
— UINT8 u8Status: Valid error flags/outputs are described in
3.2.4
UINT8 TPMS_READ_TEMPERATURE(UINT16 *u16UUMA)
•
Description:
Performs a 12-bit uncompensated temperature measurement and places it in the
UUMA. 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 ADC value is over or under the normal operating condition, the “temperature error” status
flag will be set. The expected temperature result will be forced to either “0” or “4095.” (rail
high or rail low). If the LVWF (Low Voltage Warning Flag) hardware bit is set, it will flag it
accordingly as well.
Table 9. Valid output conditions for TPMS_COMP_VOLTAGE
u8Status Value
Measurement Value
Condition
$01
$FE
Compensated voltage reading outside of valid range (high).
$01
$01
Compensated voltage reading outside of valid range (low).
$00
Between $01 - $FE
Valid compensated voltage reading.