Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    BNO055 gyro,accel and magnetometer values all 0. BNO055 stuck in configuration mode.

    ankh_morkpork
    Member

    BNO055 gyro,accel and magnetometer values all 0. BNO055 stuck in configuration mode.

    Hi!
    I'm currently trying to incorporate bno055 into zephyr RTOS for a project. As I understood the official API at https://github.com/BoschSensortec/BNO055_driver, the device needs a initialized bno055_struct instance and that instance has to be provided .read() .write() .delay() function definitions as well as I2C_address.  The device is initialized using .init() API call and reads the chip_id, acc_id, mag_id etc registers followed by writing config page to 0. Next the API reads current operation mode, if not CONFIGURE_MODE it sets device into CONFIG_MODE applies NORMAL power mode, goes back to CONFIG_MODE and sets desired OPERATION_MODE. My issue is as follows:

    When attempting to change the OPERATION_MODE to ACC_ONLY or any other mode, I can see using Saleae Logic Analyzer that I am sending a 0x11 value to 0x3D register. However when I read said register after 600ms operation mode change delay the register remains sat to 0x10 ( I am aware that the MSB is ignored). I am  using the I2C interface to read and write to registers.The device is connected as follows:
    VIN -> 3.0V, 3vo -> 3.0V, GND -> Power Supply GND, SDA -> NRF52840 SDA, SCL -> NRF52840 SCL, RST -> 3.0V, PS0 -> GND, PS1 -> GND, INT -> floating and ADR -> GND.

    So following the datasheet the device has address of 0x28 and is configured to communicate using I2C bus. Following the example provided in the bno055_support.h file the sensor shouldn't require additional calls other then .init() , set_power_mode() and set_operation_mode() to be ready to be read from. I am struggling to understand where I have made a mistake. Can somebody shed some light on to the issue?

    Thanks in advance!

    2 REPLIES 2
    Vincent
    Community Moderator

    Re: BNO055 gyro,accel and magnetometer values all 0. BNO055 stuck in configuration mode.

    I saw your I2C plotter in the attachment. 

    the I2C write process looks wrong.  you can refer to the page 102 of BNO055 datasheet for I2C write operate.  

    For me the write is not execute correctly.  

    ankh_morkpork
    Member

    Re: BNO055 gyro,accel and magnetometer values all 0. BNO055 stuck in configuration mode.

    Thank you for your reply!

    Yes my setup was wrong when attempting to write to BNO055 I should've setup communication to write a byte of data denoting  a register I wish to write to,  followed by an acknowledgement ACK  and the actual byte of data I wish to supply the register with . In my case however, the write one byte was followed by a NEW write one byte transaction resulting in nothing being writen. 

    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