cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L7CX SDA stuck at zero

electronicsbjorn
Associate

Hi, I am testing the SATEL VL53L7CX board, but the SDA on this board is stuck at zero. I have checked that there are no short cuts and that the pull up is there. Any ideas how to solve this?

2 REPLIES 2
John E KVAM
ST Employee

The absolute classic I2C problem is 'bus stuck low'. It happens because the sensor either got an un-intended bit or missed a bit. Either way, the sensor and MCU are out of sync, each device waiting for the other to pull up the SLK or SDA line. 

It happens due to noise. A bit is 'clocked' on a transition of the SCK line. But a bit of noise can clock an extra bit if there is a small glitch on the line just at the wrong time.

If you google "I2C bus stuck low" you will get lots of good advice. Everything from shorten your wires to use a stronger pull-up. But if you happen to know a good EE, get them to calculate the capacitance on the line and you can tweak your MCU to maybe put a little stronger pull-up on that line. 

If you do get stuck there are two things you can do.

1) drop the XShut line, wait 10ms and bring it back up. This reboots the sensor.

2) you can hack you I2C driver and clock 9 clk pulses. (Generally, the system clears after 1, but clocking 9 is a guaranteed solution. This works simply because a lot of clock pulses will complete whatever byte the sensor is waiting for and end the transmission. 

But the best way is put a scope on the line and look at the pulses. Are they nice and square? Is there any noise on them? Then adjust the pull-ups and decoupling caps until you get nice square shapes with not too much overshoot or undershoot. AND no noise.

And this issue is NOT limited to the VL53 sensors. Every I2C communication potentially has this issue. But the VL53L5, L7 and L8 all send a lot of data over the bus. So, it shows up here a lot.

- john


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.

Thanks a lot. The line is only a few cm long, so there should be no significant capacitance. Also the pullup is 2.2k so this should be small enough? The XShut line would that be the LPn or the I2C_RST?