Skip to main content
Associate II
Oct 22, 2026 1:15 PM UTC
Question

LIS2DW12 stops responding on I2C until power cycle — recovery options

Hi

Setup: LIS2DW12 in I2C mode, with CS and SA0 tied to VDD_IO and RES (pin 7) to GND. VDD and VDD_IO are always on. An ST25DV shares the bus. With the original 100 kΩ pull-ups we measured t_HIGH(SCL) = 3.2 µs, below the 4.0 µs minimum, and edges of about 2.2 µs.

The firmware sets SOFT_RESET by read-modify-write on CTRL2 on every sleep cycle, then sets BDU by read-modify-write.

Symptom: after some time the sensor stops acknowledging at any address. The ST25DV on the same bus still works. MCU reset and 9 SCL clocks + STOP do not help.

Bus already fixed: we replaced the external pull-ups with 10 kΩ, as in Figure 4, and adjusted the I2C timing register. t_HIGH is now about 7 µs and f(SCL) is about 67 kHz, within Table 7.

Questions:
1. Apart from I2C_DISABLE = 1, what can make the sensor stop responding on I2C until power is removed? Could the previous out-of-spec timing have caused a wrong register write?
2. Is a read-modify-write of CTRL2 right after SOFT_RESET safe? Is there a minimum wait time after it?
3. If only VDD is removed (VDD_IO kept), are all registers, including I2C_DISABLE, reset? What minimum off-time is needed?
4. What supply current should we expect in this locked state? Can it exceed the datasheet values?
5. What design do you recommend for recovery in a battery product: VDD on a GPIO, or another option?

BR

Gilberto

2 replies

Federica Bossi
ST Technical Moderator
Oct 29, 2026 11:23 AM UTC

Hi ​@gilberto-falker ,

The improved rise time and SCL high period address the bus-timing issue, but they do not by themselves establish the cause of the sensor’s later non-acknowledgment.

1. An accidental write that sets I2C_DISABLE is one possibility to investigate. With SA0 tied high, also confirm that the MCU is using the LIS2DW12’s 7-bit address 0x19 (rather than mixing 7-bit and 8-bit address notation).

The previous rise time and tHIGH were outside the stated limits. That could cause communication errors or an incorrectly sampled transaction, so an unintended register write cannot be ruled out. However, those measurements alone do not prove that a bad transaction occurred or explain why the device would remain unavailable. Capture the transactions around the failure, including START/STOP, ACK/NACK, and the transmitted register address and data. If possible, read back CTRL2 after recovery.

2. Avoid doing a read-modify-write of CTRL2 immediately after requesting a software reset. Wait for the reset to complete, preferably by polling until SOFT_RESET reads as zero, if the device permits that, and then write the desired configuration in a separate operation. For a register containing a self-clearing command bit, an explicit value or carefully masked write is generally safer than a read-modify-write. Follow the datasheet’s reset timing.

3. I would not rely on removing only VDD while keeping VDD_IO powered to reset the device. That may leave part of the device powered or allow current to flow through the interface pins, so a complete reset is not guaranteed. The exact minimum power-off time should come from the LIS2DW12 datasheet’s supply and power-on requirements. For a dependable reset, bring both VDD and VDD_IO below their specified power-down level, and prevent the I²C pull-ups from back-powering the sensor during that interval. Then wait the specified startup time before communicating again.

4.The datasheet’s normal current figures apply under specified operating conditions; they should not be treated as a guaranteed limit for an abnormal or partially powered state. Measure VDD and VDD_IO current during the failure and compare it with the applicable datasheet conditions. A missing ACK alone does not establish that the device is drawing excessive current.

5. A GPIO-controlled load switch is usually preferable to powering the sensor directly from a GPIO. Arrange the circuit so recovery removes power from both supplies, or otherwise ensures the sensor cannot be back-powered through VDD_IO, SDA, or SCL. Since the ST25DV shares the bus, isolate or protect its supply and bus connection as needed so the sensor can be power-cycled without disrupting the other device.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
Associate II
Nov 3, 2026 11:56 AM UTC

Hi

We corrected the I2C timing and added VCC control via GPIO. We will wait the results.

BR

Gilberto