Skip to main content
Associate III
February 7, 2025
Solved

VL53L4CD (ULD) not ranging?

  • February 7, 2025
  • 2 replies
  • 1111 views

We are moving to VL53L4CD.

Have it all coded but having a strange experience.  Simplistically we use the sensor continuously and only use GetResult to retrieve the sensor readings (e.g. not CheckforDataReady).

So,  simplistically looks sorta like this using the ULD:

....

VL53L4CD_SensorInit

VL53L4CD_SensorStartRanging()

while Forever

             VL53L4CD_ResultsData_t result;

             VL53L4CD_Error VL53L4CD_GetResult(&result);
....

 

This worked fine for the VL53L1X but for the VL53L4CD while all Init, StartRanging and GetResult are returning a status of 0 the reading never changes.  It gets a reasonable reading first but then just never changes.

Any idea?

Thanks,

Will

 

 

 

Best answer by will3

Appears to have been the config

2 replies

will3AuthorBest answer
Associate III
February 7, 2025

Appears to have been the config

John E KVAM
ST Employee
February 10, 2025

It almost always is the config - unless it's an I2C issue. Those are 90% of the bugs.

Nice work finding it. If you uncovered something someone else might run into, please share it. 

- john