Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BME688=Inaccurate register reading

    BME688=Inaccurate register reading

    MAJINGQI
    New Poster

    When reading the chip_id, it can be read successfully once, but when reading the status state, whether it is read before or after reset, it needs to cycle many times to get the initial value 0x01. I think there should be a problem there, although it is not here. It will have an impact, just read it a few more times, but if there is an inaccurate reading of new_date and other values later, it will cause a huge problem. So I would like to ask if you guys have any good solutions, or find out what my problem is?

    //检测芯片型号Detection chip model

    do

    {

    regAddress=0xD0;

    read(bme,regAddress,&regValue,rSize);

    bme->chipID=regValue;

    }while(bme->chipID!=0x61);

    //测试程序test program status

    regAddress=0xf3;

    read(bme,regAddress,&regValue,rSize);

    bme->status=regValue;

     

    //reset芯片

    regAddress=0x60;

    command=0xB6;

    write(bme,regAddress,command);

    //换页前检测Detection before page change

    do{

    regAddress=0xf3;

    read(bme,regAddress,&regValue,rSize);

    bme->status=regValue;

    }while(regValue!=0x01);

    //开始换页start page feed

    regAddress=0x73;

    command=0x10;

    write(bme,regAddress,command);

    bme->Delayms(10);

    //检测换页结果Detect page break results

    do

    { regAddress=0xf3;

    read(bme,regAddress,&regValue,rSize);

    bme->status=regValue&0x10;

    }while(bme->status!=0x10);

    3 REPLIES 3

    BSTRobin
    Community Moderator
    Community Moderator

    Hi MAJINGQI,

    Could we know first do you only need to read BME688 sensor data or do you also need to run BSEC?

    BSEC is not applicable, just read the data of BME688

    BSTRobin
    Community Moderator
    Community Moderator

    Hi MAJINGQI,

    As you only read BME688 sensor data, you can refer to attached example code on STM32F4 which run based on BME688 sensor API https://github.com/boschsensortec/BME68x-Sensor-API

    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