cancel
Showing results for 
Search instead for 
Did you mean: 

ILPS22QS: SWRESET bit not clearing

PhilippLudwig
Visitor

We are currently trying to run experiments with the ILPS22QS sensor. According to the datasheet, when setting the SWRESET bit in the CTRL2 register to 1, it should self-clear when the reset is finished - but this never happens. The bit stays 1, and this also effects the official driver located at https://github.com/STMicroelectronics/STMems_Standard_C_drivers/tree/master/ilps22qs_STdC - it just runs in an infinite loop, waiting for the bit to clear.

I have written my own small application to verify this.

We use a Raspberry Pi as the I2C host. Does this has anything to do with it, or is the datasheet not up-to-date?

2 REPLIES 2
Federica Bossi
ST Employee

Hi @PhilippLudwig .

The software reset procedure can take a few tens of μs; the status of the reset is signaled by the status of the
SWRESET bit of the CTRL_REG2(@11h) register. Once the reset is completed, this bit is automatically set low.

You can implement a delay after setting the SWRESET bit to allow the sensor time to complete the reset process. Sometimes, timing issues can cause the bit to not clear immediately. You can wait 50 µs (or wait until the SWRESET bit of the CTRL_REG2(@11h) register returns to 0).

 

 

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Thanks for your reply. However, I waited several seconds and the bit is still 1. I have observed that data is readable if I wait a second after the reset, so it seems that I can just ignore the flag, but it is still not behaving as it should be.