cancel
Showing results for 
Search instead for 
Did you mean: 

LPS331AP - SPI mode - Multiple slaves sharing common SPI bus

sumeet
Associate
Posted on October 07, 2014 at 19:06

We are planning to use LPS331AP in one of our design. LPS331AP will be interface to MCU using 4-wire interface. I could not find conclusive information on whether Data out (pin 7) is tri-stated/high impedance when SPI communication is terminated (CS = high). Need to use couple more devices on same SPI bus.

Also, CS pin is used to put sensor into SPI / I2C mode, so when SPI communication needs to terminated, MCU will have to drive CS=high, this will in turn put sensor into I2C mode, is this not conflicting ? 

Also, do INT1/2 pins need external pull up/down resistors on board ?

#lps331ap #spi
2 REPLIES 2
jansen
Associate II
Posted on October 21, 2015 at 15:44

''Also, CS pin is used to put sensor into SPI / I2C mode, so when SPI communication needs to terminated, MCU will have to drive CS=high, this will in turn put sensor into I2C mode, is this not conflicting ? ''

YES this is conflicting.  We found this out the hard way.  When CS is high, the device is in i2c mode so if any data on SPI SDI matches the I2C slave address that device may start also driving the SDI line corrupting data to the intended SPI device.  This is a serious bug in several ST devices that claim support for SPI.  They really can't share the SPI bus.

Nickname3482_O
Associate II
Posted on October 28, 2015 at 14:52

Hello Raghavani,

we are sorry to hear about the difficulties you have found in using our sensor.

Specifically, our current set of active environmental sensor products is not affected,

in general and to our knowledge, by SPI bus sharing issues.

Since at ST we apply a process of continuous improvement, we expect that your problem would be easier to manage on newer product generations like the LPS25HB, on which, when needed, we can support actively and better than LPS331AP which is now an obsolete device.

Regarding INT1 and INT2, you don't need any pull up resistor unless you configure those pins

as open drain.

With Regards,

Adalberto