cancel
Showing results for 
Search instead for 
Did you mean: 

I want to chain in SPI several LPS22HB pressure sensors. I would like to realize a daisy chain or a serial SPI chain.

william.le-coz
Associate

A daisy chain seems to be complicated because i can not configure the SPI chain in 4 wired at power up.

Or, I would like to connect a specific CS on each LPS22HB and connect SCL / SDI / SDO together on the same SPI bus of the MCU. But I do not understand how to initialize the bus for each sensor, because the CS set the bus type SPI or I2C at power up and bock the communication

1 REPLY 1
Eleon BORLINI
ST Employee

Hi @william.le-coz​ , you can connect a specific CS on each LPS22HB and connect SCL / SDI / SDO together on the same SPI bus of the MCU, as you say. This configuration is safe because when you stay high with the CS, the I2C interface is truly enabled, but to make the slave (LPS22HB) react to I2C you have to write via SPI its correct slave address and, even if you would do this, the master will wait for slave ACK that won't arrive. So, even if CS is high, the SPI communication cannot enable I2C. Btw, there is the possibility to set the I2C_DIS bit <3> of CTRL_REG2 (11h) top disable the I2C communication, and I would recommend it to you Regards