2022-05-06 01:39 PM
Hi,
i have multiple VL53L5CX sensors on the same bus. Right now i am initializing the firmware (vl53l5cx_init) them after setting the individual I2C addresses. I wonder if it is possible to initialize them all at once.
To my understanding the vl53l5cx_init transfers the code that runs on the internal microcontroller to it via the I2C bus. That should in theory work as kind of a broadcast transfer.
Thank you in advance.
2022-05-10 02:50 AM
Hello
In the current case (setting the individual I2C addresses first), to load the firmware you will need to give the individual I2C address of the sensor. Only one sensor at a time can be addressed. You can not initialize all the sensors at once.
If you try to load the firmware first, inside the initialization function there is a polling to know when the firmware is ready. If you have multiple sensors sharing the same bus with the same address, you cannot know which sensor is ready. This is important to respect the timescale and instruction sequence of the driver initialization which is not possible to meet with several sensors sharing the same I2C address.
So in this case, you can not initialize them all at once.
Anne