cancel
Showing results for 
Search instead for 
Did you mean: 

How to wireconnect LSM330DLC with SPI mode

Hagemu Higuchi
Associate
Posted on October 31, 2017 at 08:41

This is fundamental question, but I am confusing...

Please tell me what I think is right or wrong:

To communicate with LSM330DLC on SPI mode, the number of wiring between host and LSM330DLC is 5.

1 CS_A

2 CS_G

3 SCL_A/G(SPC)

4 SDA_A/G(SDI)

5 SDO_A & SDO_G tied togher(SDO)

The point I am comfusing most is the 5th wiring above.

Or must I use 2 pairs of SPI interface to use both Acc and Gyro?

1 ACCEPTED SOLUTION

Accepted Solutions
Miroslav BATEK
ST Employee
Posted on October 31, 2017 at 14:05

higuchi_hagemu

‌ you can connect it as you described and use only one SPI interface on your microcontroller.

You can connect it like this:

Sensor ... MCU

CS_A ... GPIO1 or CS1

CS_G ... GPIO2 or CS2

SCL_A/G ... SCK

SDA_A/G ... MOSI

SDO_A & SDO_G (tied together) ... MISO

View solution in original post

3 REPLIES 3
S.Ma
Principal
Posted on October 31, 2017 at 10:37

If you were planning to use a single SPI, it means no need to read data of both sensors at the same time.

In this case, I would use the same SPI with different alternate functions GPIOs for the data line (the clock line can be the same). Recipe:

Find an SPI with 2 MISO pins and 2 MOSI pins, 1 SCK and 2 GPIO for each CS.

Miroslav BATEK
ST Employee
Posted on October 31, 2017 at 14:05

higuchi_hagemu

‌ you can connect it as you described and use only one SPI interface on your microcontroller.

You can connect it like this:

Sensor ... MCU

CS_A ... GPIO1 or CS1

CS_G ... GPIO2 or CS2

SCL_A/G ... SCK

SDA_A/G ... MOSI

SDO_A & SDO_G (tied together) ... MISO

Posted on November 01, 2017 at 00:32

Thank you.

My brain become completely clear.

I think that this sensor consists two separated SPI slave device into one package.

I used to use MPU6050(I2C) and this one consists pure one I2C device,

so I have confused.

Thanks.