Advertisement

Quick Links

Freescale Semiconductor
User Guide
FXTH87xx11 and FXTH87xx12
Embedded Firmware User Guide
1

Introduction

This document describes the embedded firmware found
in all derivatives of the FXTH87xx11 and FXTH87xx12
devices.
The intended audience for this document is firmware
architects, developers, coders and/or testers working
with the FXTH87xx11 and FXTH87xx12 devices.
This document is divided into three sections: This
introduction, a section describing global variables and
standard formats used throughout the functions, and a
third section describing each function.
2

Globals and formats

2.1

Global variables

Table 1
summarizes all global variables used by
Freescale firmware and their locations. Developers must
account for these variables when creating new user
firmware.
© 2014 Freescale Semiconductor, Inc. All rights reserved.
Document Number: FXTH87XX1XFWUG
Contents
1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2
Globals and formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2.1 Global variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2.2 Measurement error format. . . . . . . . . . . . . . . . . . . . 3
(UUMA) format . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
(T_RDE) Format . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3
Firmware Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.1 Firmware jump table . . . . . . . . . . . . . . . . . . . . . . . 10
3.2 Function description . . . . . . . . . . . . . . . . . . . . . . . 11
Rev. 2.1, 10/2014

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FXTH87 12 Series and is the answer not in the manual?

Questions and answers

Summary of Contents for Freescale Semiconductor FXTH87 12 Series

  • Page 1: Table Of Contents

    Globals and formats Global variables Table 1 summarizes all global variables used by Freescale firmware and their locations. Developers must account for these variables when creating new user firmware. © 2014 Freescale Semiconductor, Inc. All rights reserved.
  • Page 2 It is used internally by the TPMS_READ_ACCEL family of functions and its purpose it to communicate the next measurement’s sampling rate when the u8Avg argument is set to a value greater than 2. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 3: Measurement Error Format

    In some isolated cases due to compensation calculations and rounding the result may be less than 1 or greater than 510, in which case the underflow and overflow rule mentioned above is used. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 4 CALCULATED DIGITAL ANALOG DIGITAL (10-BIT CONVERSION) VOLTAGE (9-BIT EXAMPLE) INLO INLO INMIN INMIN UNDERFLOW CASE FORCE OUTPUT TO ZERO LOWER ERROR CASE Figure 1. Measurement Signal Range Definitions FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 5 The output value will be clipped to the nearest highest or lowest allowed value and BIT0 - OVFLOW the status bit will be set. 0 Overflow/underflow not detected in last firmware subroutine call. 1 Overflow/underflow detected in last firmware subroutine call. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 6: Universal Uncompensated Measurement Array (Uuma) Format

    • Data can be read/written 8-bits at a time. • Speed of the interface is dependant on bus clock settings. • Data is transferred MSB first. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 7: Rapid Decompression Event Array (T_Rde) Format

    /* O Contains flags for Plock and RDE Event */ UINT16 u16RDEBailTimeOut; /* O Seconds to 60 mins bail-out UINT8 u8RDETimeToAvg; /* O Seconds to next averaging event } T_RDE; FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 8: Lfr Registers Initialized By Firmware

    TRIM1 — — — — — — — — TRIM2 — — — — — — — Shaded cells show register touched by firmware; loaded value is displayed. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 9 — — — — — — — — TRIM2 — — — — — — — — Shaded cells show register touched by firmware; loaded value is displayed. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 10: Firmware Functions

    TPMS_MFOCAL $E03C void TPMS_RF_ENABLE $E03F void TPMS_RF_RESET $E042 void TPMS_RF_READ_DATA $E045 void TPMS_RF_READ_DATA_REVERSE $E048 void TPMS_RF_WRITE_DATA $E04B void TPMS_RF_WRITE_DATA_REVERSE $E04E void TPMS_RF_CONFIG_DATA $E051 — Reserved $E054 void TPMS_RF_SET_TX FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 11: Function Description

    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: Stack FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 12 Between $0001 - $03FE Valid uncompensated voltage reading. WARNING The Bandgap bit (BIT0 in the SPMSC1 register) must be set prior to calling this function for results to be valid. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 13: Tpms_Comp_Voltage

    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. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 14 Valid uncompensated temperature reading, LVWF set. WARNING The Bandgap bit (BIT0 in the SPMSC1 register) must be set prior to calling this function for results to be valid. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 15: Tpms_Comp_Temperature

    — If the ADC times out with no result, the “ADC error” status flag will be set. • Stack size: 26 bytes • Approx. Duration: 2872 usec (avg of 1); 10670 usec (avg of 4). FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 16: Tpms_Comp_Pressure

    “Voltage” status flag. The accuracy of the returned value is not guaranteed. — For repeatability data, refer to the FXTH87xxxx family of data sheets. • Stack size: 46 bytes FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 17: Tpms_Read_Acceleration_X

    Power Management: This function requires the core to be configured for STOP4 mode and running at full bus speed. • Interrupt Management: This function utilizes the ADC interrupt to wake-up from STOP mode. • Resources: SMI, ADC, internal bond wires. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 18 $0000 Uncompensated acceleration reading not acquired, and LVWF set. Between $0001 - $03FE Valid uncompensated acceleration reading. Between $0001 - $03FE Valid uncompensated acceleration reading, but LVWF set FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 19: Tpms_Read_Dynamic_Accel_X

    “Voltage” status flag. The accuracy of the returned value is not guaranteed. — For repeatability data, refer to the FXTH87xxxx family of data sheets. • Stack size: 55 bytes • Approx. Duration: 955 usec FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 20 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. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 21 Power Management: This function requires the core to be configured for STOP4 mode and running at full bus speed. • Interrupt Management: This function utilizes the ADC interrupt to wake-up from STOP mode. • Resources: SMI, ADC, internal bond wires. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 22 — UINT16 *u16UUMA: Pointer to Universal Uncompensated Measurement Array (as described Section 2.3). Uncompensated voltage, temperature and acceleration will be taken from this array. • Returns: — UINT8 u8Status: Valid error flags/outputs are described in Table FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 23: Tpms_Read_Acceleration_Xz

    — UINT8 u8DynamicOffsetX: Selects the offset setting for the appropriate acceleration reading. Refer to Table 14 for more information. — UINT8 u8DynamicOffsetZ: Selects the offset setting for the appropriate acceleration reading. Refer to Table 17 for more information. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 24: Tpms_Read_Dynamic_Accel_Xz

    Interrupt Management: This function utilizes the ADC interrupt to wake-up from STOP mode. • Resources: SMI, ADC, internal bond wires. • Input Parameters: — UINT8 u8FiltSelect: If non-zero, 250-Hz filter enabled. Otherwise, 500-Hz filter selected. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 25: Tpms_Comp_Acceleration_Xz

    Uncompensated voltage suspected to be below valid operating range for this Between $0001 - $01FE function; The compensated reading is not guaranteed for accuracy. Between $0001 - $01FE Valid compensated acceleration reading. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 26 — UINT8 u8Avg: Number of measurements to average into one result. The value can be set to 1, 2, 4, 8, or 16. • Returns: — UINT8 u8Status: Valid error flags/outputs are described in Table FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 27 Stack size: 9 bytes • Approx. Duration: 1825 usec • Power Management: This function executes entirely in RUN mode. It requires the MCU to be configured for 4 MHz bus clock. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 28 — UINT8 u8Switch: Enable (non-zero) or disable (zero) RFM. • Returns: — void. WARNING This routine writes to SIMOPT1. Any configuration involving this register must be performed before calling this routine. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 29: Tpms_Rf_Read_Data

    — UINT8 u8Size: Number of bytes to read. — UINT8 *u8RamBuffer: Target memory location. — UINT8 u8RFMBuffer: Buffer register (0 to 31) to read. • Returns: — void FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 30 — UINT8 u8Size: Number of bytes to write. — UINT8 *u8RamBuffer: Source memory location. — UINT8 u8RFMBuffer: Starting buffer register (0 to 31) to write. • Returns: — void FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 31 • Input Parameters: — UINT16* u16RFParam Format as described in Table Table 22. u16RFParam Array format Index Description Refer to Table 23 for description. PLLA value. PLLB value FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 32 Resources: RFM • Input Parameters: — UINT8 u8BufferSize: Number of bits in the buffer -1 (for example, to transmit one bit, u8BufferSize should equal 0). • Returns: — void FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 33: Tpms_Rf_Dynamic_Power

    If clear, BIT4:0 will be used to set the power level directly. BIT4:0 When BIT5 is clear, the value passed here will be used to set the RF power step directly. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 34 Interrupt Management: This function does not await any interrupts. It will not be affected by interrupts. • Resources: Pins PTA1 and PTA0. • Input Parameters: — None • Returns: — UINT8 u8ReadByte: Incoming byte from the emulated serial interface. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 35: Tpms_Checksum_Xor

    — UINT8 u8Checksum: Previous checksum. This argument is useful when the function is used recursively. It must equal “0” if there is no previous data. • Returns: — UINT8 u8NewChecksum: New calculated checksum. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 36: Tpms_Crc8

    — UINT8 *u8Buffer: Buffer where data is located. — UINT16 u16MByteSize: Size of the designated buffer (in bytes) — UINT16 u16Remainder: Initial remainder. • Returns: — UINT16 u16NewCRC: New calculated CRC16. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 37 — UINT8 *u8Code: RAM location where data will be copied. Table 26 describes the format of the 6-bytes returned. Table 26. u8Code format Index Description Firmware version. Derivative descriptor. 32-bit UniqueID. • Returns: — void FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 38 This function requires ~24 usec from the moment it is called to the moment the first byte is copied into the RAM buffer. The user must consider this time when designing their firmware. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 39 If set, X-axis bond-wire check performed. BIT4 If set, Z-axis bond-wire check performed. BIT5:6 Reserved. BIT7 If set, ADC check performed. • Returns: — UINT8 u8Status: Status flags as described in Table FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 40: Tpms_Flash_Write

    — UINT8 *u8Buffer: Source memory address. — UINT8 u8Size: Number of data bytes to be written. • Returns: — void WARNING This routine will overwrite the contents of RAM locations $0090 - $00CA. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 41 (i.e. if u16Address = $D234, the contents of addresses $D200 - $D3FF will be erased). • Returns: — Zero if the page was erased successfully; else, one. WARNING This routine will overwrite the contents of RAM locations $0090- $00CA. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 42: Tpms_Flash_Protection

    16-bits of UniqueID; protection was disabled and continues to be so (Failed writing protection). $5 - $FF Reserved. WARNING This routine can only be executed once. After successful execution of this routine, TPMS_FLASH_WRITE and TPMS_FLASH_ERASE will be permanently disabled. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 43: Tpms_Mult_Sign_Int16

    — UINT8 u8Avg: Weight of the average. This value can be 2, 4, 8, 16, 32; any other value will return an incorrect response. • Returns: — UINT16 u8NewAverage: resulting weighed average of both old average and the new value (refer to Example FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 44: Tpms_Rde_Adjust_Pressure

    2.3). No values are affected. — T_RDE* ptRDEValues: Pointer to an array of elements. For more information on the RDE structure, refer to Section 2.5. • Returns: UINT8 u8Status:Always CLEAR. FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1 Freescale Semiconductor, Inc.
  • Page 45 Freescale, the Freescale logo and CodeWarrior are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. All other product or service names are the property of their respective owners. © 2014 Freescale Semiconductor, Inc. Document Number: FXTH87XX1XFWUG Rev. 2.1...

This manual is also suitable for:

Fxth87 11 series

Table of Contents