Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BMI270 soft reset trouble

    BMI270 soft reset trouble

    Larry
    New Poster

    Hi,

    I am trying to issue a soft reset (0x7E, 0xB6) in the initilization sequence and for some reason all sequences fail afterwards. So it is of no help to start directly from beginning after the reset is issued (Dummy byte etc. onwards).

    They pass again when i reset the MCU for some reason, i suspect it has something to do with the SPI pins that are altered during the reset allowing the IMU to cycle. The sensor is not power cycled in the process and i have no control of its power either (VDD and VDDIO come from the source). Serial link is with SPI 4 wire interface. There seems to be very little information on this subject in the manual.

    edit: I am chasing this more. Particularly soft reset is needed to catch the Gyro self test so not doing it is no solution. Gyro test it seems to be picky on being done early on after POR or soft reset to return its result (0b00001111). So right after the SPI dummy read, i have to issue soft reset and do small 50ms delay (increasing the delay does not help, decreasing fails), then 4 dummy reads at register 0x00.

    Dummy reads (or any other for that matter) less than 4 times, the Chip ID becomes 0xFF after reset, but even if that happens the subsequent configurations do succeed so definetly this is related to some kind of voltage tickling with SPI pins. Increasing or decreasing the SPI Mhz does not have effect.

    4 REPLIES 4

    BSTRobin
    Community Moderator
    Community Moderator
    Hi Larry, Suggest you capture the SPI waveform and check the following timing: 1.Did host send the correct reset to sensor? 2.Is there enough waiting time after software reset? 3.Is the timing for reading the chip id again correct?

    Hi,

    - What is the correct delay after soft (or powerup) reset before first valid query (datasheet shows 2ms power-on-time before SPI activation)?

    - I will take a screenshot from the waveform with reset command (0x7E, 0x6B). Response should currently show either high-impedance 1 or driven 1 (these can be distinguished from voltage levels) during several ID reads (aka dummy read 0x00) before chip activates.

    Attached are 3 captures. First shows the overall picture of SPI dummy read (0x80, 0x00, 0x00), followed by soft reset (0x7E, 0x6B). Yellow is SCK and purple is SDO (of IMU). After 2ms the responses for 4x dummy reads+1 ID read. IMU responds at fourth or fifth read sequence. Increasing the delay between reset and sequential reads does not help.

    Second image zooms in on the ID read response. Third image is the SDI of the same sequence.

    Wavy SDO is a weak pull-up from MCU that cannot reach the VDD levels and is affected by leakage currents. So during the initial dummy reads IMU keeps the high impedance state.SDO_whole.jpgSDO.jpgSDI_dummy.jpg

    BSTRobin
    Community Moderator
    Community Moderator

    Hi Larry,

    If you don't use BMI270 sensor API, you need to perform the read ID action in the red box below to activate the SPI before you do reset or read chip ID.

    2023-05-31_14h43_51.png

    The normal SPI waveform of reading chip ID and reset are like this:

    CHIP ID.pngRESET.png

    If you use BMI270 sensor API, I uploaed example code on STM32 for your reference. Hope it is useful for you.

    To use SPI, change the code in int8_t Init_BMI270(struct bmi2_dev *dev).

    from rslt = bmi2_interface_init(dev, BMI2_I2C_INTF);

    to rslt = bmi2_interface_init(dev, BMI2_SPI_INTF);

    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