Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    BMI270 soft reset trouble

    BMI270 soft reset trouble

    New Poster


    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

    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?


    - 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

    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.


    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);