cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L5CX multi-sensor ranging reading must be delayed?

SLEE.6
Associate II

I used X-NUCLEO-53L5A1 + 2 VL53L5CX-SATEL, and the data read output speed has a delay in the code: HAL_Delay(POLLING PERIOD), POLLING PERIOD == 1s, and then I want to quickly, so I canceled HAL_Delay() (Picture1), But it took a long time to check (Picture2: SDA-2/SCL-2), does multi-sensor ranging reading must be delayed?

0693W00000F9wzoQAB.png0693W00000F9wzKQAR.png

1 REPLY 1
John E KVAM
ST Employee

The sensor is going to accumulate photons for 30ms more or less based on what you have set as your Timing Budget.

That wait loop is delaying from one range to the next.

So when you get a "done', and read the answer you won't get another answer until at least the Timing Budget has passed - or the Intermeasurement Period if that's longer.

It doesn't to any good to pound the sensor asking if it's done if you know it won't be done for a while.

Better to just pause until at least most of the time has gone by before asking if it's done.

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