cancel
Showing results for 
Search instead for 
Did you mean: 

[VL53L1x] VL53L1_ERROR_CONTROL_INTERFACE when VL53L1_GetMeasurementDataReady() called

Trilys
Associate II

Hello,

I made a PCB with 7 VL53L1x, that I soldered by myself. I'm using the ST VL53L1 API.

6 of them are working great, but the # 7 return error -13 : VL53L1_ERROR_CONTROL_INTERFACE, referenced in vl53l1_errror_codes.h as :

 "/*!< error reported from IO functions */" 

Everything works until I start VL53L1_StartMeasurement() which returns no error.

After that, when I try to get any values, (with VL53L1_GetMeasurementDataReady(Dev1, &measure) for example) It returns error = -13.

I changed this sensor with a new one and still get the same error.

Do you have any idea to get this solved? Or to disable IO functions? I didn't find anything in the manual.

Thanks a lot,

Pierre

5 REPLIES 5
Trilys
Associate II

Ok I know what was the problem.

When the supply is not correctly connected, I2C works but you can't make any measure.

Hope it will help.

ToolV
Associate II

Hi Trilys,

you can validate your I2C Interface over 3 registers mentioned by L1 Datasheet, 4.2, p. 22. Which I2C Resistors are you using? Are there any other I2C devices on the same I2C bus?

Regards

Trilys
Associate II

Hello,

It works for 1 or 2 minutes after a fresh reset, then send me this error.

I'm using 5.9kOhms pull-up (with power 3.3V) on SDA and SCL.

There is only VL53 on the same I2C bus.

I can change address, try to work with them, then after a delay, they send VL53L1_ERROR_CONTROL_INTERFACE.

Thanks for help

ToolV
Associate II

Hi Trilys,

you mentioned that you have min. 7 Sensors " but the # 7 return error ". With 10 pF capacitance for each SDA IO Pin, L1 Datasheet, 4.1, Table 10, you will get 7*10 pF of parallel connected modules. Together with 5.9 kOhm Resistance it builds an lowpass so that you will get the rise time about 0.8473 * R * C = 350 ns. If there is no error in datasheet 4.1, Table 10, the maximal rise time tr < 120 ns. And if there is an error in datasheet, then the maximal tr in I2C specs is 300 ns. see UM10204, Table 10, p. 48 -> tr rise time for Fast-Mode (400k). In both cases the signal is to slow. I think you need different resistance depending on the number of modules.

Regards

John E KVAM
ST Employee

When the lasers turn on, the chip draws a lot more power (up to 20mA). So it could well be that everything works until you say 'start'.

It was a good catch. Well done.


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.