08-25-2021 06:14 PM - edited 08-25-2021 06:26 PM
I am using BSEC to read and calculate values from the BME680 sensor, but the outputs I get for IAQ, compensated humidity, and other non-raw air/gas quality values are all 0.
I also noticed that in bsec_iot_loop, the sensor_settings.next_call variable is set equal to the time_stamp before bsec_sensor_control is called, which means that the wait interval ends up negative, resulting in a BSEC_W_SC_CALL_TIMING_VIOLATION return code.
What could be going on here?
(I'm using the gcc->Cortex M4 version of the library on a crazyflie drone which has a Cortex M4 microprocessor.)
Solved! Go to Solution.
08-26-2021 04:05 AM
Hello faskrobo,
Could we know what BSEC version you used and which exmaple code you referred?
08-26-2021 07:10 PM
BSEC v1.4.8.0 downloaded from here: https://www.bosch-sensortec.com/software-tools/software/bsec/
I am using
1. bsec_datatypes.h, bsec_interface.h, and libalgobsec.a in algo/normal_version/bin/gcc/Cortex_M4
Note: The firmware for the drone uses hard floats whereas libalgobsec.a uses soft floats, so I extracted the object files from libalgobsec.a, removed the ABI attributes, and replaced the files; this allowed BSEC to be compatible with the firmware.
2. bme680_defs.h, bme680.h, bme680.c, and bsec_integration.h in examples/bsec_iot_example
3. bsec_iot_example.c in examples (bsec_iot_example.ino adapted to c)
I didn't include the bsec_serialized_configurations_iaq files since they appear to be optional.
08-27-2021 06:08 PM
Is there a library for the BME680 that has hardware ABI calls for floating points? I have to integrate the sensor with firmware that uses the hardware implementation of the floating point ABIs, but libalgobsec.a uses software ABIs.
08-28-2021 12:49 AM
I solved the issues. I needed to use the library from Cortex M4F, not Cortex M4. For some reason the specs for the Crazyflie just say M4. The M4F library supports hard floats, so I didn't need to remove ABI attributes to make it compile.