Looking for possible reasons as to why the the selftest may fail.
Running bme280_seltest.c to read the stored CRC and compare with calculated CRC.
If stored CRC of BME280 on PCB is not the same as to the calculated CRC,
what does that say about the BME280 on the PCB?
You should also compare the values of calculated_crc and stored_crc to check if any errors occurred during the calculation. In addition, if the CRC self-test result is fail, you need to check the integration of the BME280 hardware and the PCB.
When I read BME280_CRC_DATA_ADDR (0xE8) the byte comes back as 0, which ends up being different then the calculated value of 37. Is E8 the correct register for the CRC value for the BME280 or might a zero CRC value mean anything special?
I repeated the crc check on a number of sensors for case marking 109UP (the engraving on top of the BME280 sensor), getting values like:
The 109UP lot sensor is performing well.
Then for case marking 792UP I'm getting:
The 792UP lot is also performing well giving good temperature readings even with a failing crc check.
Is it possible that during production the crc value was not stored?