BMP390 attached to BHI260AP gives inaccurate pressure measurements

I have custom design based around BHI260AP smart sensor, with the BMP390 pressure sensor attached to its i2c1 bus, same as in the shuttle board 3.

I have built the FW for the sensor with the `VirtPressure` virtual sensor enabled and I've enabled it in my host mcu firmware.

I am using the BHY2 API code from github to interface with the smart sensor in my host mcu.

When I read the pressure sensor, I get raw values ~125250, and to convert them in hPa, according to the BHY2 API code, I need to divide by 128, so I obtain ~978 hPa, which is very off.

What can cause this? Is the `BMP3Baro` driver inside BHI260AP SDK (I am using version 1.1.8.0) doing pressure compensation, or should I implement custom driver for BMP390? Can anyone check what value they are obtaining when using the shuttle board?

Thanks in advance!

Best reply by Bojan

I've did more experimentations and implemented custom driver for the BMP390 sensor using the BHI260AP SDK, but still the value is same, incorrect.

I've dumped the trimming values for the calibration process and I've put them in a spreadsheet for compensation that I've found in previous forum post, for BMP388, but the procedure for compensation looks the same.

With the trimming values I've got from the sensor, the value calculated in the spreadsheet is the same as the one from the firmware, inaccurate (attached the spreadsheet with file name bmp390_compensation.xlsl).

But if I use the trimming values from the original spreadsheet, I obtain much more sensible values (attached the spreadsheet with file name bmp390_compensation_other_trim.xlsl).

I've checked the CRC for them using the self-test code found in the BMP3 API github repo, and the CRC is correct.

Is it possible that the trimming values stored in the sensor are incorrect? Any other suggestions?

Multiple devices use the same design and all give incorrect values for the pressure.

Thank you in advance.

bmp390_compensation_other_trim.xlsx
18.48KB
bmp390_compensation.xlsx
18.5KB
View original
3 replies
Resolved