VL53L1X - GPIO interrupt works when range status is different from 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-09 2:42 AM
Hello.
I have VL53L1X working in window mode with GPIO polarity active low:
- Window mode = 3 (within the distance range (min/max)).
- Min = 50mm
- Max = 200 mm
It is working well. If my hand is:
- Within window: GPIO interrupt goes up and down
- Below or beyond window: GPIO is high all the time
The problem comes when there is nothing in front of the sensor and range status is 4 (phase fail). In this cases, GPIO interrupt still works, causing my code to malfunction.
Why does GPIO works if distance is outside window thresholds and range status is different from 0?
Solved! Go to Solution.
- Labels:
-
GPIO-EXTI
-
Interrupt
-
Time of flight
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-22 7:45 AM
Hi Hardwariano,
Please try that :
status = VL53L1X_SetDistanceThreshold(dev,50,200,3,0); // fifth parameter of the function must to set to 0.
Thanks,
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-22 4:31 AM
I include some images to better illustrate my problem.
If my hand is:
- Within window --> status = 0 --> GPIO interrupt goes up and down --> OK
- Below or beyond window --> status = 0 --> GPIO interrut is high all the time --> OK
- Beyond window --> status != 0 --> GPIO interrupt goes up and down --> Is this correct behaviour??
Is this the correct behaviour of GPIO pin?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-22 7:45 AM
Hi Hardwariano,
Please try that :
status = VL53L1X_SetDistanceThreshold(dev,50,200,3,0); // fifth parameter of the function must to set to 0.
Thanks,
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-22 10:32 PM
Hello Julien,
Thanks for your response. It seems that with value = 0 now GPIO pin works well.
I used value = 1 as indicated by the API comment:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-23 2:06 AM
​Hi Hardwariano,
It is a mistake of our part. We will correct the error. Thanks, Julien
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
