I have a BMI088 IMU sensor and its accelerometer works flawlessly. But when reading the gyroscopes chip ID in register 0 it returns 0x22 (34). The value should be 0x0F. When reading the data register 2 it returns seemingly random values.
I'm communicating over SPI.
Does anyone have an idea what could be wrong? I may soon have a second sensor soldered to test, I'll then update if it works.
Thanks for you help
what is the pin connection for PS pin?
if wants to SPI mode, PS should be connected to GND.
Also you need pull low SDO2 pin when you want to get access to gyro register.
The PS pin is connected to ground, the communication with the accelerometer works perfectly.
And the SDO2 pin is pulled low otherwise I probably wouldn't get an anwser at all. But I read 0x22 from the register.
I found the problem, but I don't understand it.
The datasheet says that when reading a register, the first byte sent is a dummy byte that should be discarded. But apparently this is only true for the accelerometer and not for the gyroscope.
After not discarding the first read byte from the gyroscope it works.