02-01-2023 12:11 PM
Hello all,
we want to use the BME680 sensor. We use our own board with an TI AM3354 processor. We took the software from: https://github.com/BoschSensortec/BME68x-Sensor-API. From there (examples) we tried firstly the "fored_mode" which always displayed out the same results. So we tried the "self_test" which ended with "API name [bme68x_selftest_check] Error [-5] : Self test error". So I looked a bit deeper. In function "bme68x_selftest_check" in file bme68x.c line 770 comes:
if ((data[0].idac != 0x00) && (data[0].idac != 0xFF) &&
(data[0].status & BME68X_GASM_VALID_MSK))
{
rslt = BME68X_OK;
}
else
{
rslt = BME68X_E_SELF_TEST;
}
Looking in line 767 to see where the "data[0].*" come from I found out that "data[0].idac" is 0x0 and "date[0].status" is 0x80 which leads with bitwise "AND" BME68X_GASM_VALID_MSK (0x20) to zero. That means I got two conditions which implicated "rslt = BME68X_E_SELF_TEST;".
So the self_test failed but why. Before "bme68x_selftest_check" failed, "bme68x_interface_init" and "bme68x_init" returned "BME68X_OK". Has anybody an idea?
Rolo
02-02-2023 07:05 AM
Hi Rolo,
Refer BME680 self test github code https://github.com/boschsensortec/BME68x-Sensor-API/blob/master/examples/self_test/self_test.c, run it on STM32, it works well.
Please attached example code.
02-02-2023 10:26 AM
Hi BSTRobin,
yes this ist exact the file I used:
https://github.com/boschsensortec/BME68x-Sensor-API/blob/master/examples/self_test/self_test.c
but with the result I wrote. I tried to compile the files in the *.zip container but without success, because some include files are missing.
Can you tell me why I got for example "data[0].idac == 0x00" and not "data[0].idac != 0x00"? It's one reason why I got an errror.
Best Regards,
Rolo
02-02-2023 11:23 AM
02-17-2023 08:09 AM
Hi Rolo,
Run self-test example code, you need to add driver code bme68x.c, bme68x.h, bme68x_defs.h which is got from https://github.com/boschsensortec/BME68x-Sensor-API to your project.
I uploaded example code on STM32 for your reference.