cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L4CD non volatile address change

lodi12
Visitor

I am using the VL53L4CD sensor with a nucleo board by using the API provided by ST.

By using the xshut pin and the API, I can change the device address.

But as soon as I shut down the power or reset the sensor through xshut, its address comes back to the default one.

Am I doing something wrong?

If not, is there any way to save the new address in non-volatile way? 

 

 

3 REPLIES 3
John E KVAM
ST Employee

You are doing nothing wrong. That address change is volatile and as soon as you reboot - it goes back to original. In fact, the entire chip has no memory. Every reboot is its own adventure. 

So, if you have multiple chips - the only reason to the address change - build the address change logic into your start up sequence and run that every time you reboot.

- 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.

So tu run N sensors I always needs 2 (i2c) + N (xshut) wires, right?

No. You can chain all the devices on the same i2C bus. 

Then you need one GPIO for each of the XShut pins. 

You might consider using an additional GPIO as an interrupt, but you can poll the chip as well. - so this is optional.

But if your MCU has multiple I2C busses - many of them do - you can hook one VL53 to one bus, and one VL53 on the other bus, then simply change which bus you are talking on. 

It saves you having to change the address but limits you to two devices.


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.