2024-05-15 08:39 AM - edited 2024-05-15 08:41 AM
Hi,
I'm using a VL53L4CD_SATEL board and I would like to switch between Thresholds detection interrupt and Data available interrupt.
To be more clear, by default, I have an interrupt each time a measurement is available.
If I check the low/high/window parameters of DetectionThresholds, they are set to 0.
Now if I set a Threshold, for example
sensor.VL53L4CD_SetDetectionThresholds(150,150, 0);
now my IT is only triggered when the range is below150mm.
But my problem is when I want to come back in "normal" case, without threshold, I would like to have an IT triggered at each time a data is available, i've tried to put ma values back to 0 with
sensor.VL53L4CD_SetDetectionThresholds(0,0, 0);
but it is not working at all.
Is there a way to "cancel" the threshold IT properly and come back to "normal" interrupt?
Thank in advance
Vincent
2024-05-23 12:01 AM
Hi Vicent,
By default, the API support either data ready or interrupt by threshold. so you set all value to 0 will not make it work for data ready.
I suggest you try 0x20 value, you should be able to get interrupt when ranged data ready.
status = VL53L4CD_SetDetectionThresholds(dev, 0, 0,0x20); // this is special settings only for your use case.
Br
Zhiyuan.Han