BMI270 read of CHIP_ID fails occasionally

I have a custom board leveraging the official BMI270 driver and I'm having inconsistent results when initializing the chip. I'm using the official Github based driver. On startup a dummy read of CHIP_ID is performed and the BMI270 does not reply. This should put it in SPI mode per the datasheet. At least 450us later a real read of CHIP_ID is performed with mixed results. When using a SPI clock of 6MHz (CPOL=CPHA=0) it responds, but the bits are often shifted or wrong altogether about 50% of the time. With a 1.5 MHz SPI clock (CPOL=CPHA=0) this initialization works every time. From the datasheet it states that the device powers up in APS mode. Does this require a slower clock until it's turned off? Should it work with up to 10 MHz every time. 

3 replies