Bosch Sensortec Community

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

    BMI160: Does the address auto-increment on an SPI multibyte write operation?

    BMI160: Does the address auto-increment on an SPI multibyte write operation?

    IDEngineer
    Established Member

    Most SPI devices auto-increment the address if multiple bytes are read or written as long as the chip select is kept active. We're seeing weird behavior with register writes, and the spec sheet is vague on this question.

    When discussing 3-wire SPI, page 89 of the spec sheet says: "For single byte read as well as write operation, 16-bit protocols are used." Not exactly sure what "16-bit protocols" are in the context of SPI. Then it goes on to say: "The BMI160 also supports multiple-byte read and write operations." That sounds encouraging, other than the question of what "16-bit protocols" means in the preceding sentence.

    But later, on page 91, the spec sheet says: "Multiple read operations are possible by keeping CSB low and continuing the data transfer. Only the first register address has to be written. Addresses are automatically incremented after each read access as long as CSB stays active low." [emphasis mine]  Immediately afterward is Figure 25, which illustrates "the principle of multiple read" and shows a single address byte followed by multiple, auto-incremented read bytes of data.

    Importantly, there is no explicit mention of "multiple read operations by keeping CSB low" and there is no similar illustration like Figure 25 for "SPI multiple write". Yet page 89 clearly states "The BMI160 also supports multiple-byte read and write operations."

    Which is correct? Page 89 that says multibyte writes should work, or page 91 which describes multibyte reads but is utterly silent about multibyte writes? And what does "16-bit protocol" mean in  SPI mode when every example in the spec sheet shows 8-bit addresses and 8-bit data being exchanged?

    Thanks!

    1 REPLY 1

    Vincent
    Community Moderator
    Community Moderator

    BMI160 can support multiple register read and write. 

    Just need to avoid the FIFO address (0x24).   if this is included into your operation, then sensor will be kept into FIFO counter which is not writable from outside and you will run into problem. 

    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