Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BNO055 Long I2C clock stretching

    BNO055 Long I2C clock stretching

    Digisolve
    Established Member

    I find that the BNO055 induces quite long I2C clock stretching. The BNO055 is running in normal power mode and DNOF mode. Below is the CALIB STATUS read once every 1.2 seconds. There is no other I2C traffic.

    Below are some scope traces; These were all taken during the same test. It randomly occurs

    Is this expected behaviour, or do I have an problem?

    tek00004.pngtek00003.pngtek00005.pngtek00006.pngtek00007.pngtek00008.png

     

    9 REPLIES 9

    BSTRobin
    Community Moderator
    Community Moderator

    Hi Digisolve,

    For I2C protocol, BNO055 is an I2C slave device, and the I2C clock is initiated by the I2C master(host side).

    You could see the following I2C communication waveform on application board that has different clock waveform with your platform.

    I2C waveform.png

    Digisolve
    Established Member

    The I2C spec allows the slave to stretch the clock by holding it low. This is to allow slow slaves to slow the bus down until it's ready

    Digisolve_0-1654761930364.png

    In my code I've just added a signal (P0.1) which I drive high while while checking for the SCL signal to go high, then drive it low once SCL has gone high

    #define NEGATE_SCL {SCL_DIR_ADDR = SCL_DIR_NEG; \
    SCL_DAT_ADDR = SCL_DAT_NEG; \
    stP0.B1 = 1; \
    while(SCL_DAT_ADDR != SCL_DAT_NEG);} \
    stP0.B1 = 0;

     I think the below traces shows clearly that the BNO055 must be holding off (stretching) SCL as my P0.B1 signal is high during this time.

    It doesn't always do it & I suspect it's fine, but it does seem quite long. I just want to be sure.

    tek00010.png

    Digisolve
    Established Member

    Please can I get some feedback. My client is chasing me daily. Thank you

    BSTRobin
    Community Moderator
    Community Moderator

    Hi Digisolve,

    After the I2C stop signal, the bus will be pulled high. You can try to read one byte at a time, then each byte read will generate a stop signal.

    By the way, what impact does the current waveform have on your application?

    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