2025-07-28 10:41 AM
I was trying to implement VL53L1 TOF sensor on VL53L1-SATEL breakout board with STM Nucleo C071RB development board using STSW IMG009 VL53L1X Ultra Lite Driver.
By following the example after init, boot, setup and startRanging I called VL53L1X_CheckForDataReady(), which always returned error -13 - VL53L1_ERROR_CONTROL_INTERFACE . After extensive checking of I2C interface I figured out that this error occurs when VL53L1X_GetInterruptPolarity() is called (within checkForDataReady or independently) when ranging is active. If ranging is stopped, GetInterruptPolarity() works just fine.
My solution was to write my own library of required functions that further rely on VL53L1X_api. Before start ranging, I read the Interrupt Polarity, store it locally and then use modified checkForDataReady() function, which uses stored InterruptPolarity to check if new data is available.
Has anyone else noticed such behaviour?
This also connects to topics:
https://community.st.com/t5/imaging-sensors/vl53l1x-interrupt-not-working-no-measurements/td-p/650785
Best regards