Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BME688 no new data found

    BSTRobin
    Community Moderator

    Re: BME688 no new data found

    Hi Rosso9,

    Could you get chip ID?
    And did all code run successfully before you call bme68x_get_data()?

    This code is in example, please compare your code if it correct?
    I2C write:
    uint16_t DevAddress = dev_addr << 1;

    I2C read:
    GTXBuffer[0] = subaddress | 0x80;

    Rosso9
    Established Member

    Re: BME688 no new data found

    Hi,

    Yes I can get chip ID and it is 0x61.

    Yes, before I call bme68x_get_data() everything is ok. The output, indeed, is:

    API name [bme68x_interface_init]: All ok
    API name [bme68x_init]: All ok
    API name [bme68x_set_conf]: All ok

    chip id 0x61

    API name [bme68x_set_heatr_conf]: All ok
    Sample, TimeStamp(ms), Temperature(deg C), Pressure(Pa), Humidity(%), Gas resistance(ohm), Status
    API name [bme68x_set_op_mode]: All ok
    API name [bme68x_get_data] Warning [2] : No new data found
    API name [bme68x_set_op_mode]: All ok
    API name [bme68x_get_data] Warning [2] : No new data found

    I2C write: uint16_t DevAddress = dev_addr << 1; I try to add this line to the code but the output does not change

    I2C read: GTXBuffer[0] = subaddress | 0x80; I also try to use it, but also in this case the output does not change. (I have not used this line before because in the example you sent me, this line is in the SPI function)

     

     

    BSTRobin
    Community Moderator

    Re: BME688 no new data found

    Hi Rosso9,

    You can debug read_field_data() function with single step, see that the read data is incorrect. And capture the communication waveform with the logic analyzer to see whether the actual data is correct.

    Rosso9
    Established Member

    Re: BME688 no new data found

    Hi, thanks again.

    At the moment, I do not have a logic analyzer. However, I try to understood which is the problem in the function. The problem is during function bme68x_get_data, when it goes to function read_field_data.

    In function read_field_data this happens:

    - it enters in the while at line 1211 and does bme68x_get_regs correctly. It obtains the following values in buff.
    buff[0]: 12
    buff[1]: 93
    buff[2]: 236
    buff[3]: 30
    buff[4]: 134
    buff[5]: 141
    buff[6]: 0
    buff[7]: 0
    buff[8]: 0
    buff[9]: 0
    buff[10]: 0
    buff[11]: 0
    buff[12]: 0
    buff[13]: 0
    buff[14]: 0
    buff[15]: 51
    buff[16]: 0

    - then it calculates data->status: data->status = buff[0] & BME68X_NEW_DATA_MSK; The result of this operation is zero, and so it does not enter in the following if at line 1243

    (I have no modified the bme68x.c file)

    BSTRobin
    Community Moderator

    Re: BME688 no new data found

    Hi Rosso9,

    The data is not normal.

    It seemed that you didn't refer to the example code completely. When I run the reference code, I couldn't reproduce your problem.

    Suggest you refer to the example code completely, and test it again.

    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