cancel
Showing results for 
Search instead for 
Did you mean: 

LPS22CH: When is SA0 polled?

mckenney
Senior

We are considering using an array (>2) of LPS22CH devices on a single I2C bus, and intend to use SA0 as (in effect) a Chip Select. 

We would like to know whether SA0 is polled (a) once at startup or (b) on every Start condition [we need (b)]. DT0132 and AN5589 don't seem to discuss this, and the verbiage in the datasheet [DS13022 rev 2, Sec 7.2.1] is ambiguous, referring only to "two" devices.

In a previous version of this system, we used the LPS22HB (which has the same datasheet verbiage), and I was able to determine experimentally that it polls SA0 on every Start condition [(b) above]. Now the stakes are higher and we're hoping to get an authoritative answer.

2 REPLIES 2
Eleon BORLINI
ST Employee

Hi @mckenney​ ,

let me check if I correctly understood the question. The SA0 pin can be set High or Low by physically connect the pin to Vdd or to GND, or to a dedicated GPIO of the application processor.

In this way, you are able to use two different I2C addresses on the same line. I suppose that every time you start I2C communication with the device, it's address is internally automatically selected according to the selected SA0 pin.

0693W00000QN3oEQAT.png 

-Eleon

mckenney
Senior

Yes. On an idle bus, all the devices have (e.g.) SA0=0 (address 0x5C). To talk to one of the devices, the host sets its SA0=1, and sends the request to address 0x5D.

This "trick" only works if the device actively monitors its SA0 (b) rather than fetching it once and caching the result (a).

Some datasheets from [Other Guys] include this information explicitly, using roughly the words in (a)/(b). In the absence of such a statement, the LPS22CH's behavior could (in theory) change in the next device revision.

[Edit: Fixed typo.]