Skip to main content
APatel.13
Associate
April 15, 2022
Question

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

  • April 15, 2022
  • 1 reply
  • 948 views

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.

This topic has been closed for replies.

1 reply

John E KVAM
ST Employee
April 19, 2022

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