Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BM680 SENSOR, VOC RESULT GETTING PROBLEM

    BM680 SENSOR, VOC RESULT GETTING PROBLEM

    hihith
    New Poster

    I already import in BSEC library in my code. (platform:IDE: Simplicity StudioMCU: EFM32LG332F128G-F-QFP64). However, after execute the "bsec_do_steps" routine, no VOC output result is found. The result is attached. (Remark: NO sensor id = '4' ,BSEC_OUTPUT_BREATH_VOC_EQUIVALENT)

     

    no_sensor_id_4.png

     

    Thank!

    17 REPLIES 17

    Minhwan
    Community Moderator
    Community Moderator

    Hello hihith, 

     

    In your source, you changed some code as below, you used 100 instead of get_timestamp_us.

    bsec_iot_loop(sleep, 1000, output_ready, state_save, 10000);

    get_timestamp_us isn't just 1000, it's function to get some timestamp for getting interval time. 

    Therefore, you should implement same function for it. 

    int64_t get_timestamp_us()

    {
    return (int64_t) millis() * 1000;
    }

    Then, could you please let me know the result? 

    Thanks, 

    Sorry late reply, today i just try input the timing. I'm using the xTaskGetTickCount() in FreeRTOS. However, the result still not change.

    Or could you send the sample code which including the setting of heatup, gas_wait , nb_conv ,and etc.?

     

    Minhwan
    Community Moderator
    Community Moderator

    Hello hihith, 

     

    If you are using our official source, it should be enough to get right value. 

    https://www.bosch-sensortec.com/software-tools/software/bsec/

    I have some question. 

    As you said, you are using  xTaskGetTickCount() .  When you set get_timestamp_us function using xTaskGetTickCount, can you get right time? 

    And what is the output type of xTaskGetTickCount?  

    We are using get_timestamp_us return type as int64, it means our system time lasts 2^64 us. 

    Thanks, 

    Yes, i modified the code from https://www.bosch-sensortec.com/software-tools/software/bsec/

    I have use xTaskGetTickCount() which is in ms. I  using the  value  x 1000000 to archieve nano second. Although it is not very accurate, i think it should be a little bit change value. Is it? Is it any other thing  set wrong in my code?

    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