EasyManua.ls Logo

ST VL53L1X API User Manual

ST VL53L1X API
26 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
Page #1 background imageLoading...
Page #1 background image
Introduction
The purpose of this user manual is to describe the main functions of the VL53L1X ultra lite driver (ULD) to program the
VL53L1X sensor for ranging distances and detecting objects.
The VL53L1X ULD is an optimized version of the initial VL53L1X driver. The table below indicates the main differences between
the two drivers. For example, in the the VL53L1X ULD, the API contains only four files instead of 35, and the code footprint is
much smaller (2.3 KB vs. 9 KB in Flash).
The VL53L1X is the third generation of long distance ranging, Time-of-Flight sensors. Please refer to the VL53L1X datasheet for
more details.
Figure 1. VL53L1X sensor module
Table 1. Main differences between VL53L1X API and VL53L1X ULD API
VL53L1X API VL53L1X ULD API
Code footprint in Flash 9 KB 2.3 KB
Number of files 35 4
Timing budget (ms) [20 - 500] [15, 20, 33, 50, 100, 200, 500]
ROI position configuration Flexible (center and corner) Centered only
Fast ranging 100 Hz Yes No (66 Hz max.)
Dynamic SPAD selection (DSS)
(1)
No Yes
1. DSS is an internal operation which consists of adapting dynamically the number of active SPADs according to the quantity of returned
photons. This avoids saturating the SPAD receiver. DSS is executed at the beginning of each ranging operation.
A guide to using the VL53L1X ultra lite driver
UM2510
User manual
UM2510 - Rev 1 - December 2018
For further information contact your local STMicroelectronics sales office.
www.st.com

Table of Contents

Question and Answer IconNeed help?

Do you have a question about the ST VL53L1X API and is the answer not in the manual?

ST VL53L1X API Specifications

General IconGeneral
BrandST
ModelVL53L1X API
CategoryControl Unit
LanguageEnglish

Summary

Introduction

Acronyms and Abbreviations

VL53L1X System Overview

Ranging API Functional Description

Distance Ranging Description

Describes the autonomous ranging process and host interaction for distance measurement.

Distance Threshold Detection Description

Explains how to detect objects based on predefined distance criteria using specific functions.

Timing Considerations

Details timing budget (TB) and inter-measurement period (IMP) for measurement accuracy and power.

API Function Call Flow

Calibration Flow

Outlines the sequence of API calls for sensor calibration during manufacturing.

Ranging Flow

Describes the sequence of API calls for distance measurements and object detection.

Mandatory Functions

Sensor Boot

Explains the VL53L1X_BootState function to verify sensor boot-up before I2C access.

Sensor Initialization

Describes the VL53L1X_SensorInit function for initializing the sensor with default configuration.

Start Measurement

Details the VL53L1X_StartRanging function to initiate a distance measurement.

Optional Functions

Wait for Data Ready Notification

Explains methods for receiving notifications when ranging data is ready (polling or interrupt).

Get Ranging Data

Describes functions like GetRangeStatus and GetDistance to retrieve measurement results.

Clear Interrupt

Explains the VL53L1X_ClearInterrupt function to reset the interrupt for new data events.

Stop Measurement

Details the VL53L1X_Stop function to halt ongoing ranging operations.

Setting Distance Mode

Describes how to set distance modes (Short/Long) affecting range and ambient light performance.

Inter-Measurement Period

Explains setting the time between ranging operations (IMP) and its relation to timing budget.

Setting the Timing Budget

Details setting the timing budget (TB) for measurement accuracy and power consumption.

Setting Threshold and Detection Mode

Configures detection criteria and interrupts based on distance thresholds and window modes.

Setting ROI

Explains how to program the Region of Interest (ROI) to reduce FoV and SPAD usage.

Ranging Example Pseudo Code

Calibration Functions

Offset Calibration

Covers running, getting, and setting offset calibration for device-to-device variations.

Crosstalk Calibration

Details crosstalk calibration to compensate for cover glass effects on ranging performance.

Crosstalk Calibration Procedure

Details the step-by-step procedure for performing crosstalk calibration.

Setting Crosstalk Calibration Data

Explains how to apply the calibrated crosstalk value to the sensor.

Range Status Interpretation

Reducing Driver Size

Function Descriptions

Get SW Version

Returns the software driver version.

Set I2C Address

Sets the sensor's I2C address for multi-device applications.

Sensor Initialization

Loads configuration values to initialize the sensor.

Clear Interrupt

Clears the interrupt flag after data reading to arm the next event.

Set Interrupt Polarity

Programs the interrupt polarity (active high or low).

Get Interrupt Polarity

Returns the current interrupt polarity setting.

Start Ranging

Starts the continuous distance ranging operation.

Stop Ranging

Stops the ongoing ranging operation.

Check For Data Ready

Checks if new ranging data is available by polling a register.

Set Timing Budget

Programs the timing budget in milliseconds for measurements.

Get Timing Budget

Returns the current timing budget in milliseconds.

Set Distance Mode

Sets the distance mode (Short or Long) affecting range and performance.

Get Distance Mode

Returns the current distance mode setting.

Set Inter-Measurement Period

Programs the inter-measurement period in milliseconds.

Get Inter-Measurement Period

Returns the current inter-measurement period in milliseconds.

Boot State

Returns the boot state of the device (booted or not).

Get Sensor ID

Returns the sensor ID, which should be 0xEEAC.

Get Distance

Returns the measured distance in millimeters.

Get Signal Per SPAD

Gives the returned signal per SPAD in kcps/SPAD.

Get Ambient Per SPAD

Returns the ambient per SPAD in kcps/SPAD.

Get Signal Rate

Gives the returned signal in kcps.

Get SPAD Number

Returns the current number of enabled SPADs.

Get Ambient Rate

Returns the ambient rate in kcps.

Get Range Status

Returns the ranging status error code.

Set Offset

Programs the offset correction value in millimeters.

Get Offset

Returns the programmed offset correction value in millimeters.

Set Crosstalk

Programs the crosstalk correction value in cps.

Get Crosstalk

Returns the current programmed crosstalk correction value in cps.

Set Distance Threshold

Programs the threshold detection mode and criteria.

Get Distance Threshold Window

Returns the window detection mode (below, above, out, in).

Get Distance Threshold Low

Returns the low distance threshold in millimeters.

Get Distance Threshold High

Returns the high distance threshold in millimeters.

Set ROI

Programs the Region of Interest (ROI) width and height.

Get ROI XY

Returns the current ROI width and height.

Set Signal Threshold

Programs a new signal threshold in kcps.

Get Signal Threshold

Returns the current signal threshold in kcps.

Set Sigma Threshold

Programs a new sigma threshold in millimeters.

Get Sigma Threshold

Returns the current sigma threshold in millimeters.

Start Temperature Update

Performs temperature calibration or update.

API Structure

Revision History

Related product manuals