Functions
VL53L1 Calibration Functions

Functions used for Calibration. More...

Collaboration diagram for VL53L1 Calibration Functions:

Functions

VL53L1_Error VL53L1_GetCalibrationData (VL53L1_DEV Dev, VL53L1_CalibrationData_t *pCalibrationData)
 Gets the Calibration Data. More...
 
VL53L1_Error VL53L1_GetOpticalCenter (VL53L1_DEV Dev, FixPoint1616_t *pOpticalCenterX, FixPoint1616_t *pOpticalCenterY)
 Gets the optical center. More...
 
VL53L1_Error VL53L1_GetTuningParameter (VL53L1_DEV Dev, uint16_t TuningParameterId, int32_t *pTuningParameterValue)
 Get Tuning Parameter value for a given parameter ID. More...
 
VL53L1_Error VL53L1_GetXTalkCompensationEnable (VL53L1_DEV Dev, uint8_t *pXTalkCompensationEnable)
 Get Cross talk compensation rate enable. More...
 
VL53L1_Error VL53L1_PerformOffsetCalibration (VL53L1_DEV Dev, int32_t CalDistanceMilliMeter)
 Perform Offset Calibration. More...
 
VL53L1_Error VL53L1_PerformOffsetSimpleCalibration (VL53L1_DEV Dev, int32_t CalDistanceMilliMeter)
 Perform Offset simple Calibration. More...
 
VL53L1_Error VL53L1_PerformRefSpadManagement (VL53L1_DEV Dev)
 Performs Reference Spad Management. More...
 
VL53L1_Error VL53L1_PerformSingleTargetXTalkCalibration (VL53L1_DEV Dev, int32_t CalDistanceMilliMeter)
 Perform XTalk Calibration. More...
 
VL53L1_Error VL53L1_SetCalibrationData (VL53L1_DEV Dev, VL53L1_CalibrationData_t *pCalibrationData)
 Sets the Calibration Data. More...
 
VL53L1_Error VL53L1_SetOffsetCalibrationMode (VL53L1_DEV Dev, VL53L1_OffsetCalibrationModes OffsetCalibrationMode)
 Define the mode to be used for the offset calibration. More...
 
VL53L1_Error VL53L1_SetTuningParameter (VL53L1_DEV Dev, uint16_t TuningParameterId, int32_t TuningParameterValue)
 Set Tuning Parameter value for a given parameter ID. More...
 
VL53L1_Error VL53L1_SetXTalkCompensationEnable (VL53L1_DEV Dev, uint8_t XTalkCompensationEnable)
 Enable/Disable Cross talk compensation feature. More...
 

Detailed Description

Functions used for Calibration.

Function Documentation

◆ VL53L1_GetCalibrationData()

VL53L1_Error VL53L1_GetCalibrationData ( VL53L1_DEV  Dev,
VL53L1_CalibrationData_t pCalibrationData 
)

Gets the Calibration Data.

Function Description
This function get all the Calibration Data issued from the functions VL53L1_PerformRefSpadManagement(), VL53L1_PerformXTalkCalibration, VL53L1_PerformOffsetCalibration()
Note
This function doesn't Accesses the device
Parameters
DevDevice Handle
*pCalibrationDatapointer where to store Calibration data.
Returns
VL53L1_ERROR_NONE Success
"Other error code" See VL53L1_Error

Definition at line 2635 of file vl53l1_api.c.

◆ VL53L1_GetOpticalCenter()

VL53L1_Error VL53L1_GetOpticalCenter ( VL53L1_DEV  Dev,
FixPoint1616_t pOpticalCenterX,
FixPoint1616_t pOpticalCenterY 
)

Gets the optical center.

Function Description
This function get the optical center issued from the nvm set at FTM stage expressed in the same coordinate system as the ROI are
Note
This function doesn't Accesses the device
Parameters
DevDevice Handle
*pOpticalCentreXpointer to the X position of center in 16.16 fix point
*pOpticalCentreYpointer to the Y position of center in 16.16 fix point
Returns
VL53L1_ERROR_NONE Success
"Other error code" See VL53L1_Error

Definition at line 2719 of file vl53l1_api.c.

◆ VL53L1_GetTuningParameter()

VL53L1_Error VL53L1_GetTuningParameter ( VL53L1_DEV  Dev,
uint16_t  TuningParameterId,
int32_t pTuningParameterValue 
)

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
VL53L1_ERROR_NONE Success
"Other error code" See VL53L1_Error

Definition at line 2226 of file vl53l1_api.c.

◆ VL53L1_GetXTalkCompensationEnable()

VL53L1_Error VL53L1_GetXTalkCompensationEnable ( VL53L1_DEV  Dev,
uint8_t pXTalkCompensationEnable 
)

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
VL53L1_ERROR_NONE Success
"Other error code" See VL53L1_Error

Definition at line 2349 of file vl53l1_api.c.

◆ VL53L1_PerformOffsetCalibration()

VL53L1_Error VL53L1_PerformOffsetCalibration ( VL53L1_DEV  Dev,
int32_t  CalDistanceMilliMeter 
)

Perform Offset Calibration.

Perform a Offset calibration of the Device. This function will launch a ranging measurement, if interrupts are enabled interrupts will be done. This function will program a new value for the Offset calibration value

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
VL53L1_ERROR_NONE
"Other error code" See VL53L1_Error

Definition at line 2411 of file vl53l1_api.c.

◆ VL53L1_PerformOffsetSimpleCalibration()

VL53L1_Error VL53L1_PerformOffsetSimpleCalibration ( VL53L1_DEV  Dev,
int32_t  CalDistanceMilliMeter 
)

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
VL53L1_ERROR_NONE
VL53L1_ERROR_OFFSET_CAL_NO_SAMPLE_FAIL the calibration failed by lack of valid measurements
VL53L1_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 VL53L1_Error

Definition at line 2457 of file vl53l1_api.c.

◆ VL53L1_PerformRefSpadManagement()

VL53L1_Error VL53L1_PerformRefSpadManagement ( VL53L1_DEV  Dev)

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
VL53L1_ERROR_NONE Success
"Other error code" See VL53L1_Error

Definition at line 2249 of file vl53l1_api.c.

◆ VL53L1_PerformSingleTargetXTalkCalibration()

VL53L1_Error VL53L1_PerformSingleTargetXTalkCalibration ( VL53L1_DEV  Dev,
int32_t  CalDistanceMilliMeter 
)

Perform XTalk Calibration.

Perform a XTalk calibration of the Device. This function will launch a ranging 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
CalDistanceMilliMeterTarget distance in mm The calibration uses current preset and distance mode without altering them.
User must call VL53L1_SetPresetMode() with VL53L1_PRESETMODE_AUTONOMOUS, VL53L1_PRESETMODE_LITE_RANGING or VL53L1_PRESETMODE_LOWPOWER_AUTONOMOUS parameter prior to launch calibration
Returns
VL53L1_ERROR_NONE Success
"Other error code" See VL53L1_Error

Definition at line 2364 of file vl53l1_api.c.

◆ VL53L1_SetCalibrationData()

VL53L1_Error VL53L1_SetCalibrationData ( VL53L1_DEV  Dev,
VL53L1_CalibrationData_t pCalibrationData 
)

Sets the Calibration Data.

Function Description
This function set all the Calibration Data issued from the functions VL53L1_PerformRefSpadManagement(), VL53L1_PerformXTalkCalibration, VL53L1_PerformOffsetCalibration()
Note
This function doesn't Accesses the device
Parameters
DevDevice Handle
*pCalibrationDataPointer to Calibration data to be set.
Returns
VL53L1_ERROR_NONE Success
VL53L1_ERROR_INVALID_PARAMS pCalibrationData points to an older version of the inner structure. Need for support to convert its content.
"Other error code" See VL53L1_Error

Definition at line 2554 of file vl53l1_api.c.

◆ VL53L1_SetOffsetCalibrationMode()

VL53L1_Error VL53L1_SetOffsetCalibrationMode ( VL53L1_DEV  Dev,
VL53L1_OffsetCalibrationModes  OffsetCalibrationMode 
)

Define the mode to be used for the offset calibration.

Define the mode to be used for the offset calibration. This function should be called before run the VL53L1_PerformOffsetCalibration()

Parameters
DevDevice Handle
OffsetCalibrationModeOffset Calibration Mode valid values are:
  • VL53L1_OFFSETCALIBRATIONMODE_STANDARD
  • VL53L1_OFFSETCALIBRATIONMODE_PRERANGE_ONLY
Returns
VL53L1_ERROR_NONE Success
"Other error code" See VL53L1_Error

Definition at line 2383 of file vl53l1_api.c.

◆ VL53L1_SetTuningParameter()

VL53L1_Error VL53L1_SetTuningParameter ( VL53L1_DEV  Dev,
uint16_t  TuningParameterId,
int32_t  TuningParameterValue 
)

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
VL53L1_ERROR_NONE Success
"Other error code" See VL53L1_Error

Definition at line 2205 of file vl53l1_api.c.

◆ VL53L1_SetXTalkCompensationEnable()

VL53L1_Error VL53L1_SetXTalkCompensationEnable ( VL53L1_DEV  Dev,
uint8_t  XTalkCompensationEnable 
)

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
VL53L1_ERROR_NONE Success
"Other error code" See VL53L1_Error

Definition at line 2332 of file vl53l1_api.c.



vl53l1x
Author(s):
autogenerated on Fri Aug 2 2024 08:35:55