Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BSEC library issue set_configuration

    BSEC library issue set_configuration

    suads
    New Poster

    Hello,

    I am using silicon lab erf32xg22 board with cortex m33 and Bosch BME-680 I have ported the drivers into my project and I m getting readings from the sensor.

    I linked the static library, added bsec_integration.c and I can read the version of the lib 2.4.0.0. I m using the bsec_iot_example.c as reference, but my code get stuck one the function bsec_set_configuration it frezzes there and nothing is hapening(Using the bsec_config_iaq  from bme680_iaq_33v_3s_4d).

    The only thing I didnt implement are the state_load and state_save function.

    Must they be Implemented?

    suads_0-1696524647884.png

     

     

    4 REPLIES 4

    Minhwan
    Community Moderator
    Community Moderator

    Hi suads, 

     

    Which power mode you are using? You have to use LP mode like below. 


    ret = bsec_iot_init(BSEC_SAMPLE_RATE_LP, 0.0f, bus_write, bus_read, sleep_n, state_load, config_load, bme68x_g);

    Also, need to use proper virtual sensors. 

    Please check my bsec_integration.c

    Thank you. 

    Hi @Minhwan 

    I tried first with BSEC_SAMPLE_RATE_LP still the same issue. I m still not sure If I need to implement the state_save and state_load functions could be this causing the problem?  I tried also your bsec_integration.c same problem.This is my main.c 

    suads_1-1696587194361.png

     

     

    Minhwan
    Community Moderator
    Community Moderator

    Hi @suads , 

     

    No, you don't have to use load, store state at this point. 

    Could you share your data log using logic analyzer? 

    Thank you. 

    Hi @Minhwan 

    I m sorry but I dont have a logic analayzer but I made some progress it seems to be a bug, but not sure. While debuging the code, it comes to the work_buffer when it is created and then my code goes into a deafult handler (infitnite loop). While going through the forum I came to this post https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/Bug-in-BSEC-BSEC-integration-c/td-p/1085... but didnt fix my issue. So I tried to dynamically allocate the memory and it was working it fixed the issue. I need a little bit of test to check the values.

    But thanks, regards suad

    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