2020-02-11 02:24 AM
In my setup I have VL531LX proximity sesor connected as per datasheet.
Every time when I call startMeasurement interrupt is risen immediately after (often two interrupts).
By user manual UM2356, figure 3. this clearly should not happen.
I was wondering do you have any idea why is this happening. Thanks in advance.
2020-02-13 10:24 AM
Looks like you are right. Even though you set the threshold it doesn't look like it 'takes' until after the first range completes.
In my interrupt service routine, I read the range data and check to see if it meets the threshold requirements. If it does not, I simply return from interrupt and wait for the next one.
Sorry about that.
2020-02-13 10:32 AM
That's what I did in the end as well. Thank you!