Hello st105883,
First of all, my comment is based on our official code.
https://github.com/BoschSensortec/BMI160_driver
1. The first question is if i have to set the sensor Id to "0" or to "BMI160_CHIP_ID" ( which is 0xD8 in my case)?
- If you are using SPI and only one slave, it is okay to put 0 value, but I'd like to recommend to put the GPIO value for BMX160 chip select pin in Infineon device. 2. What do I have to write in the Read and Write Function? Do I have to write the two functions myself or is this the interface with my MC that I just have to put in? If I have to write the function myself, what does it look like?
Simply say, you have to write your own SPI write or read function in bmi160_read_spi and bmi160_write_spi for communication between MCU and BMX160. I attached an example code.
Thanks,
... View more