cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L4CD getting "stuck" returning the same value

BLiso.1
Associate II

When I run the program, the sensor starts up and is working as expected. Occasionally, the sensor gets "stuck" and just sends the same ranging results. I read that the xshut pin is sensitive and can cause a partial reset of the sensor, putting it in a bad state, but when I measure the signal, it appears to be stable. I also noticed that it only gets to this state when I start moving an object in front of it.

4 REPLIES 4
Zhiyuan.Han
ST Employee

Hi Bliso

Is it easy to reproduce or not, or can you guide me how can I reproduce it as I have never seen such issue.

One guess, does it possible was caused by ESD or some other noise.

Br

Zhiyuan.Han


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.

I cannot reproduce it, it seems to happen randomly. I think that noise is the problem. I am using Adafruit's board which uses the recommended capacitors and resistors. The sensors are about 10 cm from the microcontroller. Do you think this would require different values for the capacitors and resistors?

I was able to reproduce it and I think the issue stems from the i2c bus. With a clock speed of 50kHz, two sensors work perfectly. Increasing the clock speed to 400kHz causes the issue to occur almost immediately. When I have all four sensors connected to the PCB, the issue occurs with a 50kHz clock speed.

Zhiyuan.Han
ST Employee

Hi Bliso

L4 should support fast mode(max 400k) and fast mode plus(max 1Mhz), from your description on the issue, with 400Khz should have more bandwidth, but will cause failure. 50Khz works fine with two, but fail with 4sensor, seems bandwidth is not enough, seems it's more related with HW design, few suggestions.

1, You can try only 1 sensor on the I2C bus with different I2C speed to see if any failure.

2, Capture the oscillogram to see if the I2C timing respecting the I2C SPEC.

Br

Zhiyuan.Han​


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.