Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    Problem activating Accelerometer on BMI085 (Shuttle Board) via I2C

    Problem activating Accelerometer on BMI085 (Shuttle Board) via I2C

    bs910
    New Poster

    Hi,

    I got the BMI085 shuttle board setup in the following way, trying to interface it via an FT4232 Mini Module (which provides USB to I2C):

    bmi085_ft4232_wiring.png

    While I can read the gyro values successfully via:

    std::array< uint8, 1 > buffer = { 0x02};
    uint32 bytesTransferred = 0;
    uint32 options = I2C_TRANSFER_OPTIONS_START_BIT;
    
    auto status = I2C_DeviceWrite( m_ChannelHandle, 0x68, buffer.size(), buffer.data(), &bytesTransferred, options );
    
    std::vector< uint8 > result;
    result.resize( 6 );
    options = I2C_TRANSFER_OPTIONS_START_BIT | I2C_TRANSFER_OPTIONS_STOP_BIT;
    
    status = I2C_DeviceRead( m_ChannelHandle, 0x68, numBytesToRead, result.data(), &bytesTransferred, options );

     

    The same procedure does not work for the accelerometer (of course substituting the device and register addresses).

    It seems powering the acc up does not work correctly. Reading the ACC_CONF after power-up yields:

    10001111 (binary) which is not a valid config. Trying to change it by sending a valid config (e.g. 0xA8) results in the same reading afterwards.

    To put the acc from suspend into normal power mode I did as the datasheet said, writing 0x4 to register 0x7D.

    But this seems to get lost too, as reading the power control register sometimes also indicates that the acc part is "off".

     

    Can you spot any obvious mistakes? Is the acc initialisation wrong?

    3 REPLIES 3

    BSTRobin
    Community Moderator
    Community Moderator

    Hello bs910,

    BMI085 accelerometer and gyroscope had different I2C address, could you change I2C address to access accelerometer?

    BMI085 ACC GYRO I2C address.png

     

    Hi Robin,

    thanks for your answer. The problem was that I did not NACK the last byte as specified.

    I.e. instead of 

    options = I2C_TRANSFER_OPTIONS_START_BIT | I2C_TRANSFER_OPTIONS_STOP_BIT;
    
    status = I2C_DeviceRead( m_ChannelHandle, 0x68, numBytesToRead, result.data(), &bytesTransferred, options );

    it should be:

    options = I2C_TRANSFER_OPTIONS_START_BIT | I2C_TRANSFER_OPTIONS_STOP_BIT | I2C_TRANSFER_OPTIONS_NACK_LAST_BYTE;
    
    status = I2C_DeviceRead( m_ChannelHandle, 0x68, numBytesToRead, result.data(), &bytesTransferred, options );

     

    Best Regards,

    Ben

    BSTRobin
    Community Moderator
    Community Moderator

    Hello bs910,

    It is good to work well.

    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