Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BMI088 can't communicate properly via SPI

    BMI088 can't communicate properly via SPI

    Blues-Jiang
    New Poster

    Hello,

    We try to use BMI088 in our system, but there are some problems when we use SPI to communicate with BMI088. Our master controller is FPGA, and we write  a SPI protocol algorithm to control.

    For accelerometer part, we can successfully read and write. First, we read a configuration register, like BMI08X_ACCEL_RANGE_REG(0x41). We write a different value in this register, and read again. The value of this register is changed. After our configuration, INT2 can generate a 400 Hz data ready wave(measured by oscilloscope) as we planned. 

    The problem is in Gyroscope part. We can successfully read registers. The value of gyro_chip_id is correct. But when I write anything to those configeration registers, those values are never changed. The value of BMI08X_GYRO_LPM1_REG(0x11) is 0x00. I can't change power mode of gyroscope module. When I write 0x80 to BMI08X_GYRO_LPM1_REG,  The value I get from BMI08X_GYRO_LPM1_REG is still 0x00. I also tried to change range, bandwidth, interrupt configuration registers. No one register can change after I write a value. I also tried to soft reset the gyroscope part by write 0xB6 to BMI08X_GYRO_SOFTRESET_REG(0x14). The result is same.

    Is there any possable reason cause this situation? I don't know what to try. And I can't find some state registers in gyroscope part in datasheet. I don't know what state this gyroscope is now.

    By the way, I tried two BMI088, but the result are same. I think there are some steps I missed. I'm very confused now.  We originally wanted to migrate the configuration algorithm for data synchronization, but we were stuck here.

    If there is anything I need to provide, please let me know. Thanks for your time.

    Regards,
    Blues Jiang

    4 REPLIES 4

    o_o
    Contributor
    Hi Blues,

    The first step would be to capture a datalog of the SPI bus (3 or 4 wires) and compare it with the gyroscope SPI protocol description of the BMI088 datasheet (p.35 of the current version). The BMI088 combo chip is a bit peculiar in that the SPI protocol for the accelerometer and gyroscope parts are slightly different.

    o_o

    I have encountered the same problem. I tried to use Fpga to read the gyroscope data of bmi088 through spi, and I was able to obtain the correct gyroscope chip ID. However, the accx y z data always shows FF when it is stationary. May I ask what may be the reason for this

    BSTRobin
    Community Moderator
    Community Moderator

    Hi HowieJ,

    Did you refer BMI088 example code on github https://github.com/boschsensortec/BMI08x-Sensor-API?

     

    This is my configuration process for the imu. Firstly, after the imu is powered on, it sleeps for 50ms, then writes 0xB6 to the 0x14 register, and then sleeps for 50ms. It starts reading the data of the gyroscope 0x02 and 0x03 registers through SPI, but sometimes the data of 0x03 is 0xff and sometimes 0x00. Below is the SPI timing chart. Can you help me see where there is a problem

    HowieJ_1-1681229183369.png

     

    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