cancel
Showing results for 
Search instead for 
Did you mean: 

LSM6DSO using both of SPI/I2C

abdelrhmatta
Associate

Hello, I am designing a PCB board using LSM6DSO and STM32f1xx, this PCB design will be only an experimental design for a bigger project, so I need both SPI and I2C to be available for testing (not at the same time).
I'm wondering if there will be any issues regarding having both of them, espcially from the HW side, and is there any considerations or something to keep in mind when designing the PCB.
Thanks!

 

"Design schematic, typical connection for mode 1"Screenshot (34).png

1 REPLY 1
Federica Bossi
ST Employee

Hi @abdelrhmatta ,

Your schematic seems correct.

When using I2C, ensure CS is held high (inactive) to avoid SPI bus contention.

The SA0/SDO pin selects the I2C address or SPI mode: connect it to GND or VDD according to your addressing scheme and interface selection.

Since the pins are shared, do not connect both SPI and I2C buses simultaneously to the sensor pins. Use jumpers, switches, or solder bridges on the PCB to select between SPI and I2C lines physically.

 

 

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.