2017-04-27 02:42 AM
Hi, I'm using the VL53L0X satellite with the STM API.
For the first time calibration I'm following the calibration flow proposed in UM2039.
DataInit() and StaticInit() work well, but after using PerformRefSpadManagement(), there occurs a Control Interface Error (-20). I tracked down the error source to the following path:
VL53L0X_PerformRefSpadManagement() -> perform_ref_signal_measurement() -> PerformSingleRangingMeasurement()
VL53L0X_Error VL53L0X_PerformSingleRangingMeasurement(VL53L0X_DEV Dev,
VL53L0X_RangingMeasurementData_t *pRangingMeasurementData){ VL53L0X_Error Status = VL53L0X_ERROR_NONE; LOG_FUNCTION_START(''); /* This function will do a complete single ranging * Here we fix the mode! */ Status = VL53L0X_SetDeviceMode(Dev, VL53L0X_DEVICEMODE_SINGLE_RANGING); if (Status == VL53L0X_ERROR_NONE) Status = VL53L0X_PerformSingleMeasurement(Dev); if (Status == VL53L0X_ERROR_NONE) Status = VL53L0X_GetRangingMeasurementData(Dev, pRangingMeasurementData); if (Status == VL53L0X_ERROR_NONE) Status = VL53L0X_ClearInterruptMask(Dev, 0); //^!!this function throws an error (I2C bus busy)!!^ LOG_FUNCTION_END(Status); return Status;}When calling VL53L0X_PerformSingleRangingMeasurement() from the main, there is no problem, only, when it's called from PerformRefSpadManagement().
Thanks for your help in advance!
#vl53l0x #error2017-08-28 05:56 AM
I have the same error when trying to change the I2C address even with only one sensor attached to my Raspberry-Pi 3
2017-10-08 08:19 PM
Did you solve this problem? I'm having a similar one!