John Alexander / VL53L3_Lib

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Dependents:   VL53L3ExpansionBoard

Embed: (wiki syntax)

« Back to documentation index

VL53LX Calibration Functions

VL53LX Calibration Functions
[VL53LX Function Definition]

Get Additional Data. More...

Functions

VL53LX_Error VL53LX_SetTuningParameter (uint16_t TuningParameterId, int32_t TuningParameterValue)
 Set Tuning Parameter value for a given parameter ID.
VL53LX_Error VL53LX_GetTuningParameter (uint16_t TuningParameterId, int32_t *pTuningParameterValue)
 Get Tuning Parameter value for a given parameter ID.
VL53LX_Error VL53LX_PerformRefSpadManagement ()
 Performs Reference Spad Management.
VL53LX_Error VL53LX_SmudgeCorrectionEnable (VL53LX_SmudgeCorrectionModes Mode)
 Enable/Disable dynamic Xtalk compensation feature.
VL53LX_Error VL53LX_SetXTalkCompensationEnable (uint8_t XTalkCompensationEnable)
 Enable/Disable Cross talk compensation feature.
VL53LX_Error VL53LX_GetXTalkCompensationEnable (uint8_t *pXTalkCompensationEnable)
 Get Cross talk compensation rate enable.
VL53LX_Error VL53LX_PerformXTalkCalibration ()
 Perform XTalk Calibration.
VL53LX_Error VL53LX_SetOffsetCorrectionMode (VL53LX_OffsetCorrectionModes OffsetCorrectionMode)
 Define the mode to be used for the offset correction.
VL53LX_Error VL53LX_PerformOffsetSimpleCalibration (int32_t CalDistanceMilliMeter)
 Perform Offset simple Calibration.
VL53LX_Error VL53LX_PerformOffsetZeroDistanceCalibration ()
 Perform Offset simple Calibration with a "zero distance" target.
VL53LX_Error VL53LX_PerformOffsetPerVcselCalibration (int32_t CalDistanceMilliMeter)
 Perform Offset per Vcsel Calibration.
VL53LX_Error VL53LX_SetCalibrationData (VL53LX_CalibrationData_t *pCalibrationData)
 Sets the Calibration Data.
VL53LX_Error VL53LX_GetCalibrationData (VL53LX_CalibrationData_t *pCalibrationData)
 Gets the Calibration Data.

Detailed Description

Get Additional Data.

Function Description
This function is used to get lld debugging data on the last histogram measurement. shall be called when a new measurement is ready (interrupt or positive VL53LX_GetMeasurementDataReady() polling) and before a call to VL53LX_ClearInterruptAndStartMeasurement().
Parameters:
DevDevice Handle
pAdditionalDataPointer to Additional data
Returns:
VL53LX_Error_NONE Success
"Other error code" See VL53LX_Error Functions used for Calibration

Function Documentation

VL53LX_Error VL53LX_GetCalibrationData ( VL53LX_CalibrationData_t pCalibrationData ) [inherited]

Gets the Calibration Data.

Function Description
This function get all the Calibration Data issued from the functions VL53LX_PerformRefSpadManagement(), VL53LX_PerformXTalkCalibration, VL53LX_PerformOffsetCalibration()
Note:
This function doesn't Accesses the device
Parameters:
DevDevice Handle
*pCalibrationDatapointer where to store Calibration data.
Returns:
VL53LX_Error_NONE Success
"Other error code" See VL53LX_Error

Definition at line 28221 of file vl53lx_class.cpp.

VL53LX_Error VL53LX_GetTuningParameter ( uint16_t  TuningParameterId,
int32_t *  pTuningParameterValue 
) [inherited]

Get Tuning Parameter value for a given parameter ID.

Function Description
This function is used to get the value of the parameter identified by an unique ID.
Note:
This function doesn't Access to the device
Parameters:
DevDevice Handle
TuningParameterIdTuning Parameter ID
pTuningParameterValuePointer to Tuning Parameter Value for a given TuningParameterId.
Returns:
VL53LX_Error_NONE Success
"Other error code" See VL53LX_Error

Definition at line 27660 of file vl53lx_class.cpp.

VL53LX_Error VL53LX_GetXTalkCompensationEnable ( uint8_t *  pXTalkCompensationEnable ) [inherited]

Get Cross talk compensation rate enable.

Get if the Cross Talk is Enabled or Disabled.

Note:
This function doesn't access to the device
Parameters:
DevDevice Handle
pXTalkCompensationEnablePointer to the Cross talk compensation state 0=disabled or 1 = enabled
Returns:
VL53LX_Error_NONE Success
"Other error code" See VL53LX_Error

Definition at line 27810 of file vl53lx_class.cpp.

VL53LX_Error VL53LX_PerformOffsetPerVcselCalibration ( int32_t  CalDistanceMilliMeter ) [inherited]

Perform Offset per Vcsel Calibration.

i.e. per distance mode

Perform offset calibration of the Device depending on the three distance mode settings: short, medium and long. This function will launch few ranging measurements and computes offset calibration in each of the three distance modes. The preset mode MUST be set by the application before to call this function.

Warning:
This function is a blocking function
Note:
This function Access to the device
Parameters:
DevDevice Handle
CalDistanceMilliMeterDistance of the target used for the offset compensation calibration.
Returns:
VL53LX_Error_NONE
VL53LX_Error_OFFSET_CAL_NO_SAMPLE_FAIL the calibration failed by lack of valid measurements
VL53LX_WARNING_OFFSET_CAL_SIGMA_TOO_HIGH means that the target distance combined to the number of loops performed in the calibration lead to an internal overflow. Try to reduce the distance of the target (140 mm)
"Other error code" See VL53LX_Error

Definition at line 28329 of file vl53lx_class.cpp.

VL53LX_Error VL53LX_PerformOffsetSimpleCalibration ( int32_t  CalDistanceMilliMeter ) [inherited]

Perform Offset simple Calibration.

Perform a very simple offset calibration of the Device. This function will launch few ranging measurements and computes offset calibration. The preset mode and the distance mode MUST be set by the application before to call this function.

Warning:
This function is a blocking function
Note:
This function Access to the device
Parameters:
DevDevice Handle
CalDistanceMilliMeterCalibration distance value used for the offset compensation.
Returns:
VL53LX_Error_NONE
VL53LX_Error_OFFSET_CAL_NO_SAMPLE_FAIL the calibration failed by lack of valid measurements
VL53LX_WARNING_OFFSET_CAL_SIGMA_TOO_HIGH means that the target distance combined to the number of loops performed in the calibration lead to an internal overflow. Try to reduce the distance of the target (140 mm)
"Other error code" See VL53LX_Error

Definition at line 27913 of file vl53lx_class.cpp.

VL53LX_Error VL53LX_PerformOffsetZeroDistanceCalibration (  ) [inherited]

Perform Offset simple Calibration with a "zero distance" target.

Perform a simple offset calibration of the Device. This function will launch few ranging measurements and computes offset calibration. The preset mode and the distance mode MUST be set by the application before to call this function. A target must be place very close to the device. Ideally the target shall be touching the coverglass.

Warning:
This function is a blocking function
Note:
This function Access to the device
Parameters:
DevDevice Handle
Returns:
VL53LX_Error_NONE
VL53LX_Error_OFFSET_CAL_NO_SAMPLE_FAIL the calibration failed by lack of valid measurements
VL53LX_WARNING_OFFSET_CAL_SIGMA_TOO_HIGH means that the target distance is too large, try to put the target closer to the device
"Other error code" See VL53LX_Error

Definition at line 28015 of file vl53lx_class.cpp.

VL53LX_Error VL53LX_PerformRefSpadManagement (  ) [inherited]

Performs Reference Spad Management.

Function Description
The reference SPAD initialization procedure determines the minimum amount of reference spads to be enables to achieve a target reference signal rate and should be performed once during initialization.
Note:
This function Access to the device
Parameters:
DevDevice Handle
Returns:
VL53LX_Error_NONE Success
"Other error code" See VL53LX_Error

Definition at line 27682 of file vl53lx_class.cpp.

VL53LX_Error VL53LX_PerformXTalkCalibration (  ) [inherited]

Perform XTalk Calibration.

Perform a XTalk calibration of the Device. This function will launch a measurement, if interrupts are enabled an interrupt will be done. This function will clear the interrupt generated automatically. This function will program a new value for the XTalk compensation and it will enable the cross talk before exit.

Warning:
This function is a blocking function
Note:
This function Access to the device
Parameters:
DevDevice Handle the calibration sets appropriate distance mode and thus override existing one
The calibration uses a target which should be located at least @60cm from the device. The actual location of the target shall be passed through the bare driver tuning parameters table
Returns:
VL53LX_Error_NONE Success
"Other error code" See VL53LX_Error

Definition at line 27822 of file vl53lx_class.cpp.

VL53LX_Error VL53LX_SetCalibrationData ( VL53LX_CalibrationData_t pCalibrationData ) [inherited]

Sets the Calibration Data.

Function Description
This function set all the Calibration Data issued from the functions VL53LX_PerformRefSpadManagement(), VL53LX_PerformXTalkCalibration, VL53LX_PerformOffsetCalibration()
Note:
This function doesn't Accesses the device
Parameters:
DevDevice Handle
*pCalibrationDataPointer to Calibration data to be set.
Returns:
VL53LX_Error_NONE Success
VL53LX_Error_INVALID_PARAMS pCalibrationData points to an older version of the inner structure. Need for support to convert its content.
"Other error code" See VL53LX_Error

Definition at line 28107 of file vl53lx_class.cpp.

VL53LX_Error VL53LX_SetOffsetCorrectionMode ( VL53LX_OffsetCorrectionModes  OffsetCorrectionMode ) [inherited]

Define the mode to be used for the offset correction.

Define the mode to be used for the offset correction.

Parameters:
DevDevice Handle
OffsetCorrectionModeOffset Correction Mode valid values are:

  • VL53LX_OFFSETCORRECTIONMODE_STANDARD
  • VL53LX_OFFSETCORRECTIONMODE_PERVCSEL
Returns:
VL53LX_Error_NONE Success
"Other error code" See VL53LX_Error

Definition at line 27889 of file vl53lx_class.cpp.

VL53LX_Error VL53LX_SetTuningParameter ( uint16_t  TuningParameterId,
int32_t  TuningParameterValue 
) [inherited]

Set Tuning Parameter value for a given parameter ID.

Function Description
This function is used to improve the performance of the device. It permit to change a particular value used for a timeout or a threshold or a constant in an algorithm. The function will change the value of the parameter identified by an unique ID.
Note:
This function doesn't Access to the device
Parameters:
DevDevice Handle
TuningParameterIdTuning Parameter ID
TuningParameterValueTuning Parameter Value
Returns:
VL53LX_Error_NONE Success
"Other error code" See VL53LX_Error

Definition at line 27636 of file vl53lx_class.cpp.

VL53LX_Error VL53LX_SetXTalkCompensationEnable ( uint8_t  XTalkCompensationEnable ) [inherited]

Enable/Disable Cross talk compensation feature.

Enable/Disable Cross Talk correction.

Parameters:
DevDevice Handle
XTalkCompensationEnableCross talk compensation to be set 0 = disabled or 1 = enabled.
Returns:
VL53LX_Error_NONE Success
"Other error code" See VL53LX_Error

Definition at line 27796 of file vl53lx_class.cpp.

VL53LX_Error VL53LX_SmudgeCorrectionEnable ( VL53LX_SmudgeCorrectionModes  Mode ) [inherited]

Enable/Disable dynamic Xtalk compensation feature.

Enable/Disable dynamic Xtalk compensation (aka smudge correction).

Parameters:
DevDevice Handle
ModeSet the smudge correction mode See VL53LX_SmudgeCorrectionModes
Returns:
VL53LX_Error_NONE Success
"Other error code" See VL53LX_Error

Definition at line 27749 of file vl53lx_class.cpp.