cancel
Showing results for 
Search instead for 
Did you mean: 

Driving 11 LPS27HHTW sensors on a single I3C bus

Matk3z
Associate II

Hello everyone,


I need to drive up to 11 LPS27HHTW pressure/temperature sensors using an STM32C5 microcontroller. Currently, I'm testing the setup on an NUCLEO-C562RE board with multiple STEVAL-MKI220V1 modules.

At first glance, using I3C dynamic addressing seemed to solve the bus conflict issue. However, while testing, I realized that all of these sensors share the exact same 48-bit PID (0x020800B30000). This generates a collision when doing an ENTDAA broadcast.

Since the sensors only have 2 possible static I2C addresses (0x5c and 0x5d, depending on the SA0 pin level), I cannot use the SETDASA command for all 11 devices either.

I can't split the sensors across different buses since there are too many of them. I would like to know if there are better architectural options than playing with the CS pin levels using 11 dedicated GPIOs to enable/disable communication on each sensor individually.

Any advice on how you would drive that many sensor using a STM32C5 mcu?


Best regards,
Mathias

1 ACCEPTED SOLUTION

Accepted Solutions
Ozone
Principal III

One of my former employer solved this issue with hardware (... for I2C).
Just use a multiplexer, taking care that only one bus is enabled at a time.
Multplexing SCL should be sufficient.

Of course this adds complexity, additional code, and requires sequencial processing.
And depending on supported features, the multplexer would need to be bidirectional.

View solution in original post

5 REPLIES 5
LCE
Principal II

That looks bad. With I2C I don't see a solution without extra HW (I'd try to turn off VDD_IO with a p-channel MOSFET per pair of ICs).

Is there a way that you could use SPI and 11 CS-lines ? (Which also sounds terrible...)

Matk3z
Associate II

Thanks for your answer.

So we agree that due to the shared 48 bit ID we cannot drive that many I3C sensors even with dynamic addressing (it's the first time I use I3C, I just want to make sure that my understanding is correct here)?

If there is no other choice we will have to resort to something like SPI or at least the mosfet with pairs of sensor to save GPIOs.

Out of curiosity, do you see any other way to drive that many pressure/temperature sensors even if we need to change MCU, sensor and bus?

Andrew Neil
Super User

I2C Multiplexer ?

eg, https://www.ti.com/product-category/interface/i2c-i3c-ics/i2c-i3c-switches-multiplexers/overview.html

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
Ozone
Principal III

One of my former employer solved this issue with hardware (... for I2C).
Just use a multiplexer, taking care that only one bus is enabled at a time.
Multplexing SCL should be sufficient.

Of course this adds complexity, additional code, and requires sequencial processing.
And depending on supported features, the multplexer would need to be bidirectional.

Matk3z
Associate II

Thanks a lot for your answers. Seems like an I2C multiplexer is the way this will go :)