Skip to main content
allard
Senior
August 24, 2021
Solved

STSS22H No stretch one-shot timing

I want to readout the STSS22H, without any polling or I2C clock stretching. I want to use the following sequence:

  • Send soft reset command
  • Send one shot command
  • Release I2C bus for other processes to use
  • Wait for the maximum conversion time of the one-shot mode
  • Get the result
  • Release I2C bus for other processes to use
  • Wait for a couple seconds
  • Repeat from step 1

Is this possible with the STSS22H, where can I find the maximum conversion time in one **** mode? This information is missing in the datasheet.

This topic has been closed for replies.
DSull.3
DSull.3Best answer
Visitor II
August 25, 2021

Hi, the conversion time should depend from the ODR you set: the limit is 1Hz, so a complete conversion will take 1s. For higher ODRs, the conversion time will be lower (for example for ODR=25Hz the conversion time will be 1/25s = 40ms).

\DK

4 replies

Nandan V
Associate II
August 24, 2021

Does this help?

 0693W00000DqDvfQAF.png

allard
allardAuthor
Senior
August 25, 2021

No, it's a bit vague, does it mean that the sampling takes around 1000ms, seems a bit long.

DSull.3
DSull.3Best answer
Visitor II
August 25, 2021

Hi, the conversion time should depend from the ODR you set: the limit is 1Hz, so a complete conversion will take 1s. For higher ODRs, the conversion time will be lower (for example for ODR=25Hz the conversion time will be 1/25s = 40ms).

\DK

allard
allardAuthor
Senior
August 26, 2021

Ok, then I will go with freerunning mode at a high ODR. Can I just sample the data registers without checking for the data ready flag (I just need a most recent sample, no sync of any kind needed), or will this cause I2C clock stretching?

I've got this running in a freeRTOS thread, but sometimes the BUSY bit of the I2C peripheral (STM32F4) gets stuck, i'm suspecting due to clock stretching.