Data Sheet

DocID031478 Rev 1 19/28
UM2356 Calibration functions
28
3.1.2 RefSPAD calibration procedure
The user has to ensure that there are no targets closer than 5 cm from the sensor during the
calibration.
It is better to perform this calibration in low IR light conditions (indoor).
The time to perform this calibration is only few milliseconds.
The VL53L1_PerformRefSpadManagement function has to be called after the
VL53L1_DataInit() and VL53L1_StaticInit() functions are called. Refer to
Figure 4: VL53L1X calibration flow.
When the calibration function is called, the RefSPAD calibration is performed and the new
RefSPAD parameters are applied at the end.
3.1.3 Getting RefSPAD calibration results
The function VL53L1_GetCalibrationData() allows all calibration data to be obtained.
The returned structure VL53L1_CalibrationData_t also contains a substructure called
VL53L1_customer_nvm_managed_t which contains the eight RefSPAD calibration
parameters:
ref_spad_man__num_requested_ref_spads: this value is between 5 and 44. It gives
the number of SPADs selected.
ref_spad_man__ref_location: this value can be
non attenuated SPAD
SPAD attenuated by a factor of 5
SPAD attenuated by a factor of 10
Six additional parameters gives the good SPAD maps for the location selected.
After factory calibration, these calibration data have to be stored in the host memory and
loaded at each device start up to avoid redoing the calibration. Either the user stores the
entire structure VL53L1_CalibrationData_tor stores the eight parameters (to save memory
space).
3.1.4 Setting RefSPAD calibration data
At each start up, after a hard reset, the user can load the RefSPAD calibration data from the
host memory. The
VL53L1_SetCalibrationData() has to be called after the
VL53L1_DataInit() and VL53L1_StaticInit() functions are called. Refer to
Figure 5: VL53L1X ranging flow
If the user has optimized the calibration data storage during the calibration, it is
recommended to get the entire calibration structure by calling
VL53L1_GetCalibrationData(), modifying the eight parameters described in
Section 3.1.3: Getting RefSPAD calibration results, and calling
VL53L1_SetCalibrationData().