BMX160 SPI problems

Hi,

I am currently struggling to get the BMX160 working on SPI. I am writing my own driver.

1) The soft reset command seems to take a very long time (seconds). I can initially read the CHIPID register (0x00) correctly as 0xD8 but when I issue the soft reset command, it reads something else (most often 0x00) after a delay of at least 2ms. When I make my driver wait indefinitely for it to finally read 0xD8 after reset, it takes seconds until it succeeds (as indicated by breakpoint in CPU debugging). Initially and after the reset, I read 0x7f to get SPI initialized, as recommended. All of this I verified on the oscilloscope.

2) When I omit the soft reset, I encounter problems at getting the sensors out of suspend mode. Writing the respective PMU commands has no effect and readback of the PMU status is stuck at zero. Increasing the respective post-write delays seems to have no effect.

 

My colleague tried to get it working on an Arduino (with voltage level translator), using a BMI160 driver. There, it also fails to work on SPI, but seems to work fine on I2C.

 

3 replies