cancel
Showing results for 
Search instead for 
Did you mean: 

How to interface 4-wired SPI with interface LSM9DS0?

just4u78
Associate II
Posted on October 10, 2013 at 08:29

I'm designing with LSM9DS0.

And my goal is interface a 4-wired SPI with the MEMs device.

This is my interface design.

0690X00000604wmQAA.png

I add a 3:1 mux for interface 2 SDO pins into a MISO.

I want to know that my approach is suitable for interfacing with a simgle 4-wired SPI.

If the other idea exist, please let me know.

I can't find any reference design for LSM9DS0. So I can't refer any design.

Is there any reference design ST proposed?

#4-wired-spi #interface-confliction #lsm9ds0 #interface
4 REPLIES 4
rickygee49
Associate II
Posted on October 24, 2013 at 08:16

The SDO lines tri-state according to the data sheets (standard for SPI), so you just connect them together. Use CS to get data from the appropriate SDO pin. Make sure they are exclusive so there is no conflict. That is how I interpret the data, and how I will use the part.

just4u78
Associate II
Posted on November 07, 2013 at 06:06

Thanks ricky and there is one more question.

If I use one device as SPI, then the other device should be I2C.

Because the SCL and SDA signal share with the SPI and I2C, I concern about that the I2C device has a possibility of activation.

(LSM9DS0 has I2C slave functionality and the transaction of slave is started through a START signal. The START condition of I2C is defined as a HIGH to LOW transition on SDA while the SCL is held HIGH. The START signal transmitted from master to slave.)

If the SPI and I2C are active on the same time, Which Interface is dominant?

And, How to solve this problem?

Should I avoid the confliction by controlling the SCLK and SDI's phase?
rickygee49
Associate II
Posted on November 21, 2013 at 22:32

Data sheet section 6 says that if CS is tied high, then part is I2C, if CS is taken low, then it is SPI, and the data transactions that take place while CS is low will be SPI, so there is no conflict between the communication standards. Since you are programming the host processor, you have control of the CS and the prootcol in use.

magnus
Associate
Posted on June 24, 2014 at 15:50

But here are two CS. I assume CS_G and CS_XM are or'ed internally to select SPI/I2C (If CS_G is 1 and CS_XM is 0, is the SDA/SDI-pin in SPI or I2C mode)?

And is there any solution for more SPI-devices than a single LSM9DS0 on the same SPI-bus?