cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in changing address of VL53L1 sensors using "VL53L1_SetDeviceAddress" function.

APatel.13
Associate II

Hi ST team and community,

I'm here because I have some troubles on the process of initialization of multiple sensors VL53L1.

I use the library of VL53L1.

The process is the following :

  • Shut down reset pin XSHUT of each sensor

Then, in a loop (to setup my 2 sensors) :

  • Power ON the first sensor with XSHUT pin.
  • Trying to change address using "VL53L1_SetDeviceAddress" function.

Then, switch to another sensor in the loop until initialization of my 2 sensors.

My problem is when the loop arrives on the"VL53L1_SetDeviceAddress" function it gets fail. 

Question is, When I try to connect 2 sensor and go for to change address it get fails.

Note: If I remove second sensor and dis-connect XSHUT pin from host of 1st sensor and attach it to pull up by connecting 10k it works and I'm getting data with default address.

1 REPLY 1
John E KVAM
ST Employee

My guess is that you are too fast. Your MCU is way faster than the sensor. Try lifting the reset pin, then waiting 10ms and the calling the 'are you booted' command. (I forget the name.) When the sensor tells you it's booted you can change the address.

(Or you could just wait 20ms assuming it's booted by then.)

  • john

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.