3.5.4 Wait for notification ranging data to be ready
There are two ways to receive notification that ranging data are ready:
• The host can poll a register value change. This is done by using the VL53L1X_CheckForDataReady which
returns “1” when new ranging data are ready.
• The host can wait for a physical interrupt event. The interrupt event can be triggered at the GPIO1 pin. The
interrupt polarity can be set by the VL53L1X_SetInterruptPolarity function. This changes the interruption
transition (from high to low or from low to high)
3.5.5 Get ranging data
Each type of ranging data has its own get ranging data functions. The VL53L1X_GetRangeStatus and
VL53L1X_GetDistance are the main get ranging data functions. If required, other ranging data parameters can be
read, for example, return signal, ambient rate, etc.
3.5.6 Clear interrupt
Use the VL53L1X_ClearInterrupt function to clear the interrupt. It is strongly recommanded to clear the interrupt to
enable the next interrupt event when new ranging data are ready.
3.5.7 Stop the measurement
Ranging occurs continuously. To stop the current ranging operation, the user can use the stop command,
VL53L1X_Stop (). If the stop command is issue during the ranging operation, the sensor completes the current
ranging operation before stopping.
3.6 Optional functions
3.6.1 Setting distance mode
Two distance modes are available: Short and Long (default). Short mode has better ambient light immunity but
the maximum distance measurable is limited to 1.3 m. Long distance mode ranges up to 4 m but is less
performant under ambient light.
Use the function VL53L1X_SetDistanceMode (dev, DM) to set the distance mode. For Short mode, DM = 1 and
for Long mode, DM = 2.
VL53L1X_GetDistanceMode returns the current distance mode.
3.6.2 Inter-measurement period
The inter-measurement period (IMP) is the time between two ranging operations (see Section 3.3 Timing
considerations).
Use the VL53L1X_SetInterMeasurementInMs function to set the intermeasurement period in milliseconds.
VL53L1X_GetIntermeasurementInMs returns the curent IMP. The default IMP is 100 ms.
The IMP must be greater than or equal to the TB otherwise the start of ranging is missed and the
intermeaurement period is effectively doubled. The user has to verify the TB and the intermeasurement period as
there is no automatic check in the API.
3.6.3 Setting the timing budget
The TB is the time required by the sensor to make one distance measurement (see Section 3.3 Timing
considerations).
Use the VL53L1X_SetTimingBudget function to set the TB in milliseconds. The TB values available are [15, 20,
33, 50, 100, 200, 500]. This function must be called after VL53L1X_SetDistanceMode.
Note: 15 ms only works with Short distance mode. 100 ms is the default value.
The TB can be adjusted to improve the standard deviation (SD) of the measurement. Increasing the TB,
decreases the SD but increases the power consumption. For example, VL53L1X_SetTimingBudgetInMs (&dev,
50) sets the TB to 50 ms. VL5L31X_GetTimingBudget returns the current TB.
UM2510
Optional functions
UM2510 - Rev 1
page 7/26