Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    Unable to read ChipID of BMI323 through spi using TI TM4C123GXL

    Unable to read ChipID of BMI323 through spi using TI TM4C123GXL

    New Poster

    I am trying to interface BMI323 IMU with TM4C123GXL microcontroller using SPI. 

    For first stage, I thought of trying something simple like reading the chipID, but i am unable to get a response from the imu.

    I have connected VDD and VDDIO to 3.3V from mcu dev board.

    First i am writing 0x80 (as 0x00 is the address and 8th bit is high for read operation) and the writing 0x00 3 more times expecting a response from the IMU. Next,  I am reading the data from the receive buffer which should contain the chip ID.


    This is the data I am writing to the SDI pin of the IMU (blue - clock, red - data out of mcu)


    This is the data I am receiving from the SDO pin of IMU (blue - clock, red - data out of imu)


    This is the output of chip select for reference with the clock (blue - clock, red - chip select)

    Is there anythig I am currently implimenting incorrectly

    2 REPLIES 2

    Community Moderator
    Community Moderator

    Hi Naren,

    Firstly make sure your hardware was correctly connected.
    If possible, you can capture all SPI signal(CS, SCK, SDI, SDO) in one picture.
    For clock polarity and phase, it is necessary to ensure that the settings in the data sheet are followed:

    And software should strictly references the example code on Github

    Sorry for the delayed response.

    I was trying out all the combinations. I found out why I wasn't getting a response from the IMU. In the default write command(SSIDataPut) in SPI library(ssi.h) for TM4C123GXL writing multiple bytes was not a option so, I was writing in a for loop. But, with multiple write commands the Chip select would be pulled high after every byte instead of after all the bytes which the BMI323 expects. 

    This is the output of chip select with reference to clock (blue - clock, red - chip select)-Naren_3-1699367769679.png

    So, to work around this, I connected a GPIO pin to Chip select and toggle it before and after transmission of all the bytes.