2016-11-02 03:14 PM
Hello Everyone,
I am having trouble talking to the LSM6DS3 using 4 wire SPI. I have verified the signals to the device as being correct per the datasheet. I am commanding 0x8F to do a WHO_AM_I command but am not seeing anything coming back on MISO. The only problem I can think of is the SCx and SDx pin is left open. I did not tie them to VCC or ground. Could this be the problem? Due to the package, I can't modify it on board.2016-11-02 05:26 PM
Those lines shouldn't be floating for sure but since lsm is a master here it might have pull-ups on those lines maybe you can measure voltage on those pins. Anyway I don't think it would affect your readings. Maybe double check your SPI configuration so speed shouldnt be higher than 10MHz with 8bit Data size. Also if you are using NSS pin maybe switch to software controlled pin. Since at least for me NSS didn't work as it should after switching to software CS pin it worked and I can read the data from LSM6
2016-12-13 11:37 AM
I don't know if you mistyped the value, but the WHO_AM_I Command is 0x0F and not 0x8F for LSM6DS3.
2016-12-14 04:51 AM
By default, most mems use 3 wire mode (don't know this one in details). When NSS is low, the chip is selected. When NSS is high, it uses I2C (so be careful if using multiple SPI slave devices). To activate the 4 wire mode, you may have (in 3 wire mode) to write a bit inside the chip to activate the 4 wire mode. Then reading the WHO_AM_I may work...
Hope this helps. Good luck!