Hi, I am working with the BMP388. I was able to read the chip id from the sensor. However, when reading the pressure or temperature I only get the default values in the data sheet. I guessing I didn't initialize something right, my sensor settings are attached.
Thanks in advance for any asistance!
Solved! Go to Solution.
The setting is correct and the procedure looks also OK since i tried at my side, the sensor is working and i can get the temperature and pressure data after follow your steps.
So you need check your bus write function to see if the value are correctly write into the sensor. you can try to read the value after write the register to double check.
That's what I figured, so I read back the written values to double check. And I read the correct configuration settings, however I still get the defaults. It looks like this.
read_byte = 0x80
read_byte = 0x00
read_byte = 0x00
I did check the Status register too, it reads 0x10, the data sheet states that drdy_press get reset when pressure data is read out. Does this mean it will go high after a read? Or does it need to be high before a pressure read?
Also, when putting the sensor in normal mode, can it not respond to I2C for some duration? I tried to read that part too, but it froze up then.
You can refer to figure 11 in the datasheet for default as non-latching mode with status register change plotter.
So when data is stored into data register, the status is going to high. then the read of data register done, the status bit will be clear to 0. then next new data stored in register, the status bit will change to 1 again.
So you need to read the status bit first to make sure it is 1 which means you have new data stored in the data register, then you read the data register. In this case, you should not get default value from data register any more.
Hint: the data measurement always take some time. after you change the power mode of sensor, you need to wait certain time to get measurement done and new data stored in data register. this time is different based on different over sampling settings.
At the same time, the normal mode is running in internal logic. during normal mode, the bus communicate have no lilmitation. you can always do read / write to the sensor registers. But if you change any setting about the measurement, it will affect the result in data register.