User Manual
Table Of Contents
2 Package content and data flow
2.1 Driver architecture and content
The VL53L4CD Ultra Lite driver package is composed of four folders. The driver is located in folder /
VL53L4CD_ULD_API. The following figure represents the driver architecture.
Figure 4. Driver architecture
User also needs to implement two files located into the /Platform folder. The proposed platform is an empty
dummy, and must be filled with dedicated functions.
Note: Platform.h file contains mandatory macros to use ULD. All the file content is mandatory to correctly use the ULD.
2.2 Calibrations
To benefit from the full performance of the sensor, the VL53L4CD driver includes two calibration functions (offset
and crosstalk) which need to be run once at the production line. These calibration procedures have to be run to
compensate for device-to-device variation (i.e. when the absolute measured distance is not the same from one
device to another) and the presence of the cover glass that may affect the device ranging performances.
2.2.1 Calibration order
Calibration data, stored in the host system, have to be loaded in the VL53L4CD sensor at each startup using
a dedicated driver function. The calibration sequence order is important. Offset calibration should be run first
followed by crosstalk calibration. The two calibrations may be run sequentially one after the other, or may be
run individually. When run individually, make sure the offset data have been programmed into the sensor before
running crosstalk calibration.
2.2.2 Offset calibration procedure
Offset corresponds to the difference between real distance and measured distance. A default offset is
programmed into the sensor, but a calibration may be required to improve accuracy.
To perform the calibration, ST recommends to use a 17 % reflective target at 100 mm from the device in dark
conditions, and call function VL53L4CD_CalibrateOffset (). The function finds the offset, applies the offset, and
returns the offset correction value. It takes a few seconds to be performed. Offset calibration must be performed
before Xtalk calibration. The following table shows the available settings for running offset calibration.
Table 1. Available settings for running offset calibration
Setting Min Proposed by ST Max
Distance [mm] 50 100 255
Number of samples 5 20 255
UM2931
Package content and data flow
UM2931 - Rev 1
page 4/15