EasyManua.ls Logo

ST VL53L8CX - Getting Ranging Results; Using Raw Firmware Format; Results Interpretation

ST VL53L8CX
20 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
5.3 Getting ranging results
During the ranging session, there are two ways to know if new ranging data is available:
Polling mode: Continuously uses function vl53l8cx_check_data_ready(). It detects a new stream count
returned by the sensor.
Interrupt mode: Waits for an interrupt raised on pin A1 (INT). The interrupt is automatically cleared after
~100 μs.
When new data is ready, the results can be read using function vl53l8cx_get_ranging_data(). It returns an
updated structure containing all selected output. As the device is asynchronous, there is no interrupt to clear to
continue the ranging session.
This feature is available for both continuous and autonomous ranging modes.
5.4 Using raw firmware format
After transferring ranging data through I2C/SPI, there is a conversion between the firmware format and the host
format. This operation is typically performed to have a ranging distance in millimeters as a default output of the
sensor. If the user wants to use the firmware format, the following macro must be defined in the platform file:
VL53L8CX
#define VL53L8CX_USE_RAW_FORMAT
5.5 Results interpretation
The data returned by the VL53L8CX can be filtered in order to take into account the target status. The status
indicates the measurement validity. The full status list is described in the following table.
Table 4. List of available target status
Target status
Description
0 Ranging data are not updated
1 Signal rate too low on SPAD array
2 Target phase
3 Sigma estimator too high
4 Target consistency failed
5 Range valid
6 Wrap around not performed (Typically the first range)
7 Rate consistency failed
8 Signal rate too low for the current target
9 Range valid with large pulse (may be due to a merged target)
10 Range valid, but no target detected at previous range
11 Measurement consistency failed
12 Target blurred by another one, due to sharpener
13 Target detected but inconsistent data. Frequently happens for secondary targets.
255 No target detected (only if number of target detected is enabled)
To have consistent data, the user needs to filter invalid target status. To give a confidence rating, a target with
status 5 is considered as 100 % valid. A status of 6 or 9 can be considered with a confidence value of 50 %. All
other statuses are below 50 % confidence level.
UM3109
Getting ranging results
UM3109 - Rev 1
page 16/20