User Manual

DocID029105 Rev 1 21/26
UM2039 API useful additional functions
26
In single ranging mode, the maximum programmable threshold is 254mm.
The interrupt threshold behaviour is described in Table 5.
VL53L0X_SetInterruptThresholds()and
VL53L0X_GetInterruptThresholds()allow to set/get the interrupt thresholds.
After reading a measurement, host has to clear the interrupt by
using the following function.
VL53L0_ClearInterruptMask()
VL53L0X_ClearInterruptMask()and VL53L0X_GetInterruptMaskStatus()allow
to set/get the interrupt.
Example code is provided within the API release to help the implementation of interrupt
settings on the host.
Note: In Table 5, ranging mode all = continuous, continuous timed and single ranging
Note: There is no interrupt generated if no target is detected in threshold high mode (with any
threshold value).
Table 5. Interrupt threshold behaviour
Interrupt options Ranging distance Threshold value Ranging mode GPIO state
Level Low
> thresh_low - all no interrupt
< thresh_low
thresh_low <
254mm
all interrupt at GPIO
< thresh_low
thresh_low >
254mm
continuous or
continuous timed
interrupt at GPIO
< thresh_low
thresh_low >
254mm
single
no interrupt
(limitation)
Level High
< thresh_high - all no interrupt
> thresh_high
thresh_high <
254mm
all interrupt at GPIO
> thresh_high
thresh_high >
254mm
continuous or
continuous timed
interrupt at GPIO
> thresh_high
thresh_high >
254mm
single
no interrupt
(limitation)