cancel
Showing results for 
Search instead for 
Did you mean: 

I have a problem on VL53L5CX_ULD API (exaple1 ranging basic) during the function vl53l5cx_init(&Dev).

PV.4
Associate

0693W00000GYROIQA5.png0693W00000GYRdXQAX.pngI am using the exaple1 ranging basic (VL53L5CX_ULD API ) on microcontroller nrf52840.

during vl53l5cx_init(&Dev) we get stuck on "do while loop" in the below Function (vl53l5cx_poll_for_answer() line number 304 ). 

I'm include the I2C driver (Read&Write) and also I attached the image of (where I got stuck with the Function)

2 REPLIES 2
John E KVAM
ST Employee

Generally this happens when the I2C is mis-configured. But you got a ways before you got stuck.

Check the status of the I2C. My guess is the I2C timed out.

But then you have to figure out why the I2C timed out.

NXP (who bought Philips) still has the best info on how to 'tune' the I2C bus.

Might want to start there.

  • 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.
KWine
Senior

Or look here. VL53L5CX is notoriously fussy about I2C read/write.