cancel
Showing results for 
Search instead for 
Did you mean: 

Hi, does the LPS22HB pressure sensor use clock stretching on the I2C bus (when needed)? (Perhaps all I2C slave devices do, but I am somewhat new to I2C details...)

FLund.1
Associate II
 
1 ACCEPTED SOLUTION

Accepted Solutions

Hi Fredrik @FLund.1​ ,

1.0 us at 300kHz should work, if you can guarantee there is little or no jitter on the SCL clock slopes...

I cannot exclude in principle potential problems, but they should not result in hard faults: you may skip some clock frame but, since the pressure measured by the sensor is varying slowly in time compared to the clock frequency, you will not get a big measurement difference.

-Eleon

View solution in original post

5 REPLIES 5
Eleon BORLINI
ST Employee

Hi @FLund.1​ ,

there is some elasticity on the ST sensors from the clock stretching point of view, but tolerances are not declared, so it is better to manage the clock tuning from the I2C master side. You can however try and see if it works, for your specific case.

The sensor supports I2C standard mode and the fast mode, so a broad range of clock frequencies: which is the I2C frequency of your application?

-Eleon

FLund.1
Associate II

Hi, thanks for the quick reply!

The SCL frequency during data transfer is around 300 kHz. Our main concern is the fact that our master device uses a SCL LOW time which is shorter than the I2C specification. Our SCL LOW time is 1.0 us, whereas the specification requires >1.3 us. That is why I wondered about clock stretching; if the ST sensor will stretch the clock if the SCL LOW time is not enough?

The design works - we read good data from the sensor with the current design, but we are considering potential problems that might arise because of the deviant SCL LOW time.

-Thanks

/Fredrik

Hi Fredrik @FLund.1​ ,

1.0 us at 300kHz should work, if you can guarantee there is little or no jitter on the SCL clock slopes...

I cannot exclude in principle potential problems, but they should not result in hard faults: you may skip some clock frame but, since the pressure measured by the sensor is varying slowly in time compared to the clock frequency, you will not get a big measurement difference.

-Eleon

Eleon BORLINI
ST Employee

Hi @FLund.1​ ,

were you able to test your I2C with the LPS22HB?

-Eleon

Hi @Eleon BORLINI​ 

Yes, everything works fine. Tested and released for production. Thanks for the support!

/Fredrik