cancel
Showing results for 
Search instead for 
Did you mean: 

STSS22H No stretch one-shot timing

allard
Senior

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.

1 ACCEPTED SOLUTION

Accepted Solutions
DSull.3
Associate III

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

View solution in original post

4 REPLIES 4
Nandan V
Associate II

Does this help?

 0693W00000DqDvfQAF.png

allard
Senior

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

DSull.3
Associate III

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
Senior

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.