Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BMI085: I2C read data not changing between 2 or more data ready interrupts

    BMI085: I2C read data not changing between 2 or more data ready interrupts

    Jens
    New Poster

    Hello,

    i am currently implementing 2 BMI085 in a rotating enviroment.
    It happens quite often that after i get a interrupt from accelerometer and i read out triggered by that the accelrometer axis and sensortime, that the values of the axis are not changing over 2-8 interrupts. So the accelerometer data stays constant for this time which means in my setup almost 100ms of constant data when the device is actually turning!
    The sensorTime is actually changing between every I2C read out (i read always 9 bytes beginning on register 0x12).

    The accelerometers are configured to +/-4g and ODR=100Hz with no oversampling (BW=40Hz) and gyroscope ODR=100Hz, BW=12Hz.
    The gyroscope does not show this phenomenon, but both accelerometers!

    Attached you can find a plot that shows one accelerometer axis over sensorTime (this wasn't a rotating scenario, but me shaking the device).

    I tried a lot and find out that this problem shows also up, if i do not configure and not use the interrupts, but read all devices sequentially within one thread. So i do something like:
    while(1){
    startTime = getTime();
    readAcc1();
    readGyr1();
    readAcc2();
    readGyr2();
    endTime = getTime();
    sleep(12ms - (endTime-startTime));
    }

    As shown above the BMI085 is configured to ODR=100Hz what is every 10ms. If i read my devices every 12ms i still get constant values over 2-3 reads.
    The only thing that fixes the problem of reading out constant values is to increase the cycle time to at least 17-18ms.

    So going back to my application where i need to know the exact time when the data was generated (this is why is need the interrupts), i have to ignore every second interrupt to get over this problem that the accelerometer register 0x12 ,0x13,0x14,0x15,0x16,0x17 are holding sometimes the value from the interrupt before.

    I am out of ideas here. Can you help me or is this a known issue?
    My expectation was that if i set the chip to ODR=100Hz that i will get fresh data after each interrupt. But this is not happening!

    Best regards,
    Jens

     

    3 REPLIES 3

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    Thanks for your inquiry.

    I tried APP2.0 base board and BMI085 shuttle board with DD2.0 GUI SW. I don't see any repeated accel data in the data log file. Maybe you can try the following.

    void BMI088_accel_init(void)

    {

            Write value of 0x00 to register 0x7C;  // disable power save mode

            Write value of 0x04 to register 0x7D;  // enable accel and set it to normal mode

            Write value of 0x0A to register 0x53;  // set INT1 pin as output, push-pull and active high

            Write value of 0x04 to register 0x58;  // map accel DRDY interrupt signal to INT1 pin

    }

    In your interrupt routine function, you can read accel data from register 0x12 to 0x17. You should not get repeated accel data.

    Thanks.

     

    Hi,

    thank you for your response.
    Your suggestions are already in my code, except that my interrupt is open-drain and active low.
    I have to add a information here:
    My problem with constant values between 2 or more reads (it does not matter if i read interrupt triggered or just read cyclically without having interrupts configured) do NOT happen if i read only the accelerometer.
    But it happens as soon as i read also the gyroscope of this IMU or i read from 2 BMI085 the accelerometer (The gyro is configured to ODR 100Hz).
    So just reading one accelerometer or one gyroscope works fine for me. 
    When i read one accelerometer and another accelerometer or gyroscope (my setup has 2 BMI085) i read often (several times per second) constant values from the accelerometer. (the gyroscope reads are always fine)
    Before we had 2 BMI055 and we just exchanged this 2 BMI055 with 2 BMI085 (pin compatible). Nothing on the circuit else changed. WIth the 2 BMI055 our application ran fine for a big amount of boards.
    Another development unit of our company is using one BMI085 in their product and see exactly the same issue i have. My system and their system are running 2 different YOCTO linux versions and i use I2C with 100kHz and my colleauges with 400kHz.

    Any thoughts on this issue how we might solve it?

    Best regards and thank you for your support,
    Jens

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    Please let me know which country you are located in. And also please let me know your email address from private message. Our local field application engineer will support you further.

    Thanks.

    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