2018-06-28 05:48 AM
I plan on using the LSM6DS3US with an SPI interface. To do this i have to set the CS line to 1. The SPI bus I have is a shared bus with SPI memory devices, each controlled by their own CS line. Therefore on first glance the LSM6DS3US should just sit on the shared bus and only become active when its CS line goes high.
However...when the CS line of the LSM6DS3US is 0 it puts the SPI SDI and SCK lines into I2C mode. Therefore when I am not using the LSM6DS3US and have therefore deselected it by putting CS low, I am in fact adding an I2C device onto my shared SPI bus.
This doesn't sounds good to me.
Will the LSM6DS3US cope with this and will it cause issues for the other, potential active, SPI devices?
#lsm6ds3us-spi-interface-(what-hapens-when-i2c-is-select2018-07-02 06:22 AM
First of all the logic is opposite:
CS ... 0 ... SPI mode
CS ... 1 ... I2C mode
Normally the I2C device on SPI bus is not a problem, but you can disable the I2C interface using I2C_disable bit in CTRL4_C register.