Questions on chip_id read of BMI270

hi, all

   I use SPI to connect to BMI270, I have 2 questions:

   1. when I send 0x80 0xff 0xff, I can read MISO as 0xff 0x00 0x24. So 0x24 is chip_id, it is correct.

        when I send 0x80 0xff, I can read MISO as 0xff 0x00.

        which command is correct?

2. when I read BMI270 status after write_config_file, which command should I use?

     send 0xa1 0xff 0xff and read receive buffer of 3 bytes, byte0: ff, byte 1: ff and byte 2 is the status

    or send 0xa1 0xff and read receive buffer of 2bytes, byte 0: ff, byte 1: the status.

    which is correct?

Thank you in advance.

 

Best reply by BSTRobin

Hi victorheca01,

Please note that the first byte received from the device via the SDO line corresponds to a dummy byte and the second byte corresponds to the value read out of the specified register address.


I also upload actual SPI waveform on MCU platform for your reference.

Do you mean reading BMI270 internal status after loading config file? If yes, the register address should be 0x21.

There is BMI270 sensor API & example code for your reference on github https://github.com/boschsensortec/BMI270-Sensor-API.It has implemented the driver code for accessing sensor.

View original
3 replies
Resolved