Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    BME680 with BSEC: Some outputs don't work & timing violation

    BME680 with BSEC: Some outputs don't work & timing violation

    faskrobo
    Member

    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.)

    4 REPLIES 4

    BSTRobin
    Community Moderator
    Community Moderator

    Hello faskrobo,

    Could we know what BSEC version you used and which exmaple code you referred?

    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.

    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.

    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.

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist