![Freescale Semiconductor FXTH87 11 Series Скачать руководство пользователя страница 7](http://html.mh-extra.com/html/freescale-semiconductor/fxth87-11-series/fxth87-11-series_firmware-user-manual_2330494007.webp)
Globals and formats
FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1
Freescale Semiconductor, Inc.
7
•
A single line will be used for both sending and receiving data (BIDIROE = SET according to
Freescale nomenclature).
— At the clock’s rising edge, the master will place data on the pin. It will be valid until the clock’s
falling edge. The slave must not drive the line during this period.
— At the clock’s falling edge, the master will make the data pin an input and will “listen” for data.
The slave must then place data on the data line until the clock’s rising edge.
•
Clock Polarity = 0 (Normally low).
•
Clock Phase = 1 (First half is high).
shows the details of the simulated SPI interface.
Figure 2. Description of the physical layer on the FXTH87xx11
and
FXTH87xx12 Simulated SPI interface
For further information on the use of the Simulated SPI interface routines, refer to
,
, and
.
2.5
Rapid Decompression Event Array (T_RDE) Format
The FXTH87xx11 and FXTH87xx12 includes a routine called TPMS_RDE_ADJUST_PRESSURE that
requires a pointer to an array of elements using a custom format called T_RDE. Said format is easily
manageable using a
typedef
instruction as shown in
.
Example 1. Sample typedef for a T_RDE array
typedef struct
{
UINT16 u16CompPress; /* I/O 9-bit Compensated pressure reading */
UINT8 u8ElapsedTime; /* I Elapsed time from previous reading */
UINT16 u16WAvg; /* O Weighed average for running pressure */
UINT8 u8PRes; /* O 8-bit pressure reserve value */
UINT8 u8PMin; /* O 8-bit minimum pressure value */
UINT8 u8RDEStatusFlags; /* 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;
PTA0
PTA1
Write
MSB
...
Write
Write
Write
Read
Read
Read
Write
LSB
Read
MSB
Write
Read
Read
LSB
...