Skip to main content
Explorer
February 4, 2025
Question

ILPS22QS: SWRESET bit not clearing

  • February 4, 2025
  • 1 reply
  • 491 views

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?

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    February 4, 2025

    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).

     

     

    Explorer
    February 4, 2025

    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.