(FXTH87 Tire Pressure Monitor Sensor Family) Accelerometer Wake up

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

(FXTH87 Tire Pressure Monitor Sensor Family) Accelerometer Wake up

854 Views
arvindsingh
Contributor I

I am new to FXTH87 Family.

I ran demo code using codewarrier and measured temperature, pressure and accelerometer and are working fine.

Now i need to implement a functionality,

For example:- Vehicle is in parking, at that time device should go into low power mode.  and when it starts moving accelerometer will sense it any wake up the whole device.

In b/w what is the difference b/w these two API's

UINT8 TPMS_READ_ACCELERATION_X(UINT16 *u16UUMA, UINT8u8Avg, UINT8 u8FiltSelect, UINT8 u8DynamicOffset)

UINT8 TPMS_READ_DYNAMIC_ACCEL_X(UINT8 u8Filter, UINT8* u8Offset, UINT16* u16UUMA)

Labels (1)
0 Kudos
1 Reply

469 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Arvind,

The purpose of these two functions is explained in the Embedded Firmware User Guide.

As you can see in the datasheet of the FXTH87xx (e.g. FXTH871x6), the acceleration range for X-axis is between -80g and 90g  (page 156 of the datasheet). This range is divided into 16 steps (also called offsets or windows) of 20g. Whatever the offset is, the value of the acceleration that we get from the ADC will always be between 1 and 510 counts. But depending on the offset these counts will not have the same meaning. For example, 510 counts means 10g at offset 7 and 50g at offset 11. So in order to calculate the actual value of acceleration, we need to know the value of the actual offset.

When the FXTH87 is not moving or moving very slowly then we are at offset 7 (we know that the acceleration is between -10g and 10g). But when the module is moving faster (when it is in a car) then we do not know the offset. This is why there are two functions to read the acceleration:

-  TPMS_READ_ACCELERATION: As you can see, one of the input parameters of the function is u8DynamicOffset (the offset). So in order to call this function you need to know the offset.

- TPMS_READ_DYNAMIC_ACCELERATION: As you can see, one of the input parameters is a pointer to the offset UINT8* u8Offset, and the value pointed by this pointer is not used as input by the function. The function will calculate the actual offset and an updated offset value is returned at the end of the function. So in order to calculate the actual value of the acceleration you will use the updated value of the offset returned by the function. So this function is used when the car is moving so when we do not know in advance the actual value of the offset.

I hope it clarifies your question. If you need more information, please let us know.

Regards,

Tomas

PS: If my answer helps to solve your question, please mark it as "Correct". Thank you.

0 Kudos