Skip to main content
PV.4
Visitor II
November 22, 2021
Question

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

  • November 22, 2021
  • 2 replies
  • 718 views

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)

This topic has been closed for replies.

2 replies

John E KVAM
ST Employee
December 7, 2021

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
KWine
Senior
December 7, 2021

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