LSM6DSM: Unreliable SPI
Hi all, I'm trying to bring up an LSM6DSM (MKI189 dev board) via SPI using a Nucleo and the STM C libraries for it. I've had some luck but I'm getting extremely unreliable SPI communication ( MISO line specifically ). For starters when I read the WhoAmI register I sometimes read 0x6A as expected but I read a number of other things as well ( 0x60, 0x40, 0x44 ) are common.
I've been trying to use the logic analyzer to figure out what's going on and I've noticed that depending on how the board feels having the Logic Analyzer (Saleae) attached can make things better or worse. I have my code reading the register every 100ms and I'll try disconnecting/reconnecting the harness from the logic analyzer. Sometimes plugging it in make it impossible to read the correct value and sometimes unplugging it makes it impossible. During the transition of plugging in/unplugging it almost always is able to read the correct value. I suspected noisy lines at first but I'm running at 20kHz now.
Does anyone have any suggestions on where to look to debug this?
Quick edit: I2C seems to work just fine.

