The steval-mki021v1 is a demonstration kit designed to provide the user with a complete, ready-to-use platform for the evaluation of the lis331al (9 pages)
Page 1
Introduction The VL53L4CX is a Time-of-Flight (ToF) sensor, specifically designed for long range, multitarget detection, providing very accurate distance measurement up to 6 m with excellent results over short distances. The purpose of this user manual is to describe the integration model and the set of functions to call to get ranging data using the VL53L4CX bare driver.
The bare driver is an implementation of a set of functions required to use the VL53L4CX device. It makes minimal assumptions on the OS integration and services. As such, sequencing of actions, execution/threading model, platform adaptation, and device structures allocation are not part of the bare driver implementation but left open to the integrator.
UM2923 Ranging functional description Ranging functional description This section briefly describes the functional capabilities of VL53L4CX ranging device. Ranging sequence The device is running with a handshake mechanism, based on a standard interrupt management scheme. After each ranging, the host acquires the ranging data and enables the next ranging by clearing the interrupt. An interrupt is raised when a valid range is available.
UM2923 Timing considerations Handshake sequence allows the computation of internal parameters and apply them for next range. The handshake must be performed by the user of the bare driver. Minimizing the delay in enabling a new ranging after a new measurement has been received is key to maximizing the system measurement rate Timing considerations Timings are presented in Figure 3.
Factory applications used for device calibration, typically at the end of product manufacturing test (factory flow) • Field applications, which include all end-user applications using the VL53L4CX device (ranging flow) Bare driver Bare driver factory flow is illustrated in the following figure.
Page 7
UM2923 Bare driver Figure 5. VL53L4CX API ranging flow (field) WaitDeviceBooted() Host calls driver Host action function DataInit() Driver internal Data result SetCalibrationData() action Host calls Optional SetDistanceMode() driver function StartMeasurement() Polling/ Interrupt mode Host polling mode interrupt Driver polling mode...
UM2923 System initialization System initialization The following section shows the API functions calls required to perform the system initialization, before starting a measurement. 3.2.1 Wait for boot VL53LX_WaitDeviceBooted() function ensures that the device is booted and ready. It is not mandatory to call this function. Note: This function blocks the host execution.
UM2923 Ranging with VL53L4CX Ranging with VL53L4CX On non-Linux hosts, the user of the bare driver sequences calls to the driver in a way that is appropriate to the application needs, the platform capabilities and the bare driver call sequence rules.
UM2923 Ranging data structures Ranging data structures The structure named VL53LX_MultiRangingData_t contains the following data applicable to all targets detected: • TimeStamp: not implemented. • StreamCount: this 8-bit integer gives a counter incremented at each range. This 8-bit integer gives a counter incremented at each range.
Page 11
UM2923 Ranging data structures Table 1. Range Status Value RangeStatus String Comment VL53LX_RANGESTATUS_RANGE_VALID Ranging measurement is valid Raised if sigma estimator check is above the VL53LX_RANGESTATUS_SIGMA_FAIL internal defined threshold. Sigma estimator gives a qualitative information about the signal. VL53LX_RANGESTATUS_SIGNAL_FAIL Raised when signal is too low to detect a target. VL53LX_RANGESTATUS_OUTOFBOUNDS_FAIL Raised when range result is out of bounds VL53LX_RANGESTATUS_HARDWARE_FAIL...
5.3.1 Set a tuning parameter An extra function exists to load tuning parameters. For specific use cases, ST can recommend some specific parameters composed of a key and a value. The list of tuning parameters and their default values is given in the vl53lx_tuning_parm_defaults.h file. Either change a tuning parameter value in this file and recompile the code, or use the VL53LX_SetTuningParameter() function to load this tuning parameter.
If the user increases the value, the maximum ranging distance can be improved, but latency is impacted. Coverglass smudge detection The crosstalk can be affected by smudge on the coverglass. VL53L4CX embeds a function able to detect smudge on the fly and apply a new crosstalk correction value.
Customer factory calibration functions Customer factory calibration functions In order to benefit of full performance of the device, VL53L4CX driver includes calibration functions to be run once on the customer production line. Calibration procedures have to be run to compensate part to part parameters that may affect the device performances.
Crosstalk (XTalk) is defined as the amount of signal received on the return array which is due to VCSEL light reflection inside the protective window (coverglass) added on top of the module for aesthetic reasons. Depending on the coverglass quality, this parasitic signal can affect the device performances. VL53L4CX has a built-in correction that allows to compensate this problem.
UM2923 Offset calibration 6.2.3 Getting crosstalk calibration results Calibration results consist, among others, of an histogram and a parameter called “plane offset”. The plane offset represents the amount of correction applied, and the histogram is the repartition of the correction on each bin. The function VL53LX_GetCalibrationData() returns all the calibration data.
UM2923 Offset calibration 6.3.2 Offset calibration procedure Customers can select any chart reflectance placed at any distance (using the same setup as the crosstalk calibration). The only point to check is to ensure the signal rate is measured between 2 and 80MCps with the chosen setup.
UM2923 Offset calibration 6.3.5 Setting offset calibration data The customer can load the offset calibration data after VL53LX_DataInit() function is called, by using VL53LX_SetCalibrationData(). It is better to call VL53LX_GetCalibrationData(), modify the parameters described in previous sections and call VL53LX_SetCalibrationData() UM2923 - Rev 2 page 18/25...
UM2923 Customer repair shop calibrations Customer repair shop calibrations In case the calibration values are lost, due to component change in a repair shop, customer can apply a dedicated procedure, where no specific setup (targets) are needed. The calibration is composed of three steps: RefSpad Crosstalk Offset calibrations...
IMIT_FAIL The function will exit and leave the current crosstalk parameters unaltered VL53LX_ERROR_OFFSET_CAL_NO_SAMPLE_FA An error occurred during offset calibration. Check setup is in line with ST recommendations. VL53LX_ERROR_OFFSET_CAL_NO_SPADS_ENA BLED_FAIL Warning: number of spads found is too low to get VL53LX_WARNING_REF_SPAD_CHAR_NOT_EN accurate refSpadManagement calibration.
Page 21
Warning occurred during offset calibration. Ensure setup is in line with ST recommendations. VL53LX_WARNING_OFFSET_CAL_RATE_TOO_HI VL53LX_WARNING_OFFSET_CAL_SPAD_COUNT _TOO_LOW Warning occurred during crosstalk calibration. VL53LX_WARNING_XTALK_MISSING_SAMPLES Ensure setup is in line with ST recommendations. VL53LX_ERROR_NOT_IMPLEMENTED Function called is not implemented UM2923 - Rev 2 page 21/25...
Page 25
ST’s terms and conditions of sale in place at the time of order acknowledgment. Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of purchasers’...
Need help?
Do you have a question about the VL53L4CX and is the answer not in the manual?
Questions and answers