2021-04-08 08:57 AM
Hello,
I am desperate, have been looking for the cause of a malfunction for quite a long time now.
I use the VL53L1X with the ULD API.
My code looks like the example code:
An IRQ occured,
In ISR, I read the distance and clear the interrupt:
After that, no more IRQ occured, the GPIO pins stayed at low level.
When I hold my hand over the sensor, the measured distance is much smaller. The sensor should therefore work.
Why then does it not trigger any further interrupts?
Any ideas?
Best regards,
Karsten
2021-04-08 09:22 AM
Hello,
The intermeasurment time is the same as the timing budget. Set 200ms as intermeasurement and you should have what you need.
Best regards
Dom
2021-04-08 10:54 AM
I did it as in the sample settings. I am surprised that just these settings should not work.
Nevertheless, I found the error, it was a faulty logical link in a conversion of a 32-bit value into four 8-bit values. Rookie mistake ;)
2021-04-09 02:26 AM
The intermeasurment time includes by definition the Timing budget. In theory, they can be equal but to be safe, few µs delay might help. I propose you 200ms because I thought you wanted a 100ms measurement every 100ms. That's good you found the issue!
2021-04-09 05:46 AM
Ok, now I use 200ms for the intermeasurement time and 100ms for the time budget.
For a while it works quite well.
But suddenly the INT pin is high, but when I ask the chip if data is ready, I get a "not ready".
VL53L1_get_interrupt_polarity: 0x00
VL53L1_GPIO_TIO_HV_STATUS: 0x03
-> data not ready
What happens here? What can I do?
ClearInterrupt lets the INT Pin stay at high signal.