MPL3115A2 stops providing temperature and pressure data - Status reads as 00

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

MPL3115A2 stops providing temperature and pressure data - Status reads as 00

1,040 Views
brentweight
Contributor I

We are using the MPL3115A2 barometeric and temperature sensor in a project.   Periodically, the chip just stops providing data and the only way to get it to work again is to power cycle it.  

Specifically, the STATUS REGISTER bit PTDR never gets set to a value of 1. (The entire register is actual 0).  This registers as an error in our code and times out.

We can read the control registers (so it is not a communication issue).  They appear to be the same values (Control Reg 1, 2, 3, 4, 5  as 0x39 0x00 0x11 0x00 0x00) whether it is working or not (they never seem to change when the error occurs).   When we read the control register bit SBYB, it is a 1. 

We have tried setting SBYB to Standby and then back to Active and had the same issue.  Also tried to reinitialize everything and still would not provide data.  

We need help figure out what is causing this or how to recover from it.  Perhaps we have the chip configured incorrectly.  

We are using a non FIFO option with a reading frequency (oversample ratio of 128).  We are polling the device as needed and not using any of the events (even though they may be set to on).

This never seems to happen immediately after startup but after a period of time.  (We are trying to test it to see if there is a pattern in the time but we don't have any data yet).  

Any help is greatly appreciated. Glad to answer questions.  

Tags (1)
0 Kudos
3 Replies

718 Views
david_diaz
NXP Employee
NXP Employee

Hello Brent,

First of all, please make sure you have the correct device configuration.

Please review the example project from the link below. I recommend using it as a reference for your initialization.

MPL3115A2 - Bare metal example project

Is the device well configured?

Regards,

David

0 Kudos

718 Views
brentweight
Contributor I

Hi David, 

Thanks for sharing the example project.  

We have the device working.  We can take hundreds of readings from it but then all of a sudden it just stops providing data.  It still communicates, but the data is never marked as being ready.  It is almost like it is in Standby mode, but we have tried setting it back to active and nothing happens. 

Perhaps we have the wrong operating mode for our usage.  The Bare Metal example seems to be using an interrupt.  We are just polling the device at specific times as we don't need the values constantly. 

What would cause it to just hang up?  Is there a way to recover from it?  

We may may modify to use a one shot method, but we didn't want to just make this change without first understanding the cause of the issue. 

Brent

0 Kudos

718 Views
david_diaz
NXP Employee
NXP Employee

Hello Brent,

When you are polling, the MCU must poll the sensor at a rate that is faster than the output data rate. Otherwise, if the polling is too slow, data samples might be missed. The MCU can detect the missed or corrupted data condition by checking the overwrite flags in the STATUS register.

So, I recommend decreasing the output data rate of the sensor. Can you please do it and share your results?

How many parts have you tested so far and on how many of them you are getting “incorrect” output?

I hope this information will be useful for you.

Regards,

David

0 Kudos