User Manual

DocID029105 Rev 1 13/26
UM2039 System initialization/calibration
26
4 System initialization/calibration
The following section shows the API function calls required to perform the system
initialization, before starting the first range measurement after reset.
4.1 Data init
VL53L0X_DataInit() function is called one time, and it performs the device initialization.
To be called once and only once after device is brought out of reset.
4.2 Static Init
VL53L0X_StaticInit() function allows to load device settings specific for a given use
case.
4.3 Load calibration data
4.3.1 Reference SPADs
VL53L0X_SetReferenceSpads() and VL53L0X_GetReferenceSpads() can be used
to set/get the number and type of reference SPADs.
If the calibration has not been performed (using
VL53L0X_PerformRefSpadManagement()), or if the Host has not programmed the
number and type of SPADs (using VL53L0X_SetReferenceSpads()),
VL53L0X_GetReferenceSpads() will return the number and type of reference SPADs
programmed into the device NVM.
4.3.2 Ref calibration
Load calibration parameters by using VL53L0X_SetRefCalibration(). This assumes
that user has previously performed a calibration and stored the two parameters in the Host
memory.
4.3.3 Offset calibration
Host has to load the offset calibration data at each startup of the device.
The offset value expressed in micrometers has to be set in the device using API function:
VL53L0X_SetOffsetCalibrationDataMicroMeter()
4.3.4 Cross-talk correction
In a standard usage, the Host will have to program the cross-talk correction factor and
enable the cross-talk correction.
The correction factor is the result of the calibration and has to be stored in the Host.