I think you've named it. The 'nothing' case. And it's a tricky one.
It's actually in the VL53L4CD ULD threshold, but unfortunately it was left out of the UltraLowPower (ULP) driver.
But anything used in the ULD can be used in the ULP. They are, after all, the same part.
In the ULP is the comment:
0x20, /* 0x46 : interrupt configuration
0->level low detection,
1-> level high,
2-> Out of window,
3->In window, 0x20-> New sample ready , TBC */
In the ULP we only give you a choice between 0 (below a threshold) and 20 - (new sample ready).
I think you want Out of Window.
Set a high, set a low and select Interrupt 2.
The code from the ULD driver is below. You could actually stick that code in your ULP driver.
VL53L1X_ERROR VL53L1X_SetDistanceThreshold(VL53L1_Dev_t dev, uint16_t ThreshLow,
uint16_t ThreshHigh, uint8_t Window,
uint8_t IntOnNoTarget)
{
VL53L1X_ERROR status = 0;
uint8_t Temp = 0;
status = VL53L1_RdByte(&dev, SYSTEM__INTERRUPT_CONFIG_GPIO, &Temp);
Temp = Temp & 0x47;
if (IntOnNoTarget == 0) {
status = VL53L1_WrByte(&dev, SYSTEM__INTERRUPT_CONFIG_GPIO,
(Temp | (Window & 0x07)));
} else {
status = VL53L1_WrByte(&dev, SYSTEM__INTERRUPT_CONFIG_GPIO,
((Temp | (Window & 0x07)) | 0x40));
}
status = VL53L1_WrWord(&dev, SYSTEM__THRESH_HIGH, ThreshHigh);
status = VL53L1_WrWord(&dev, SYSTEM__THRESH_LOW, ThreshLow);
return status;
}