Skip to main content
Associate
August 12, 2024
Solved

VL53L7CX Driver - Implement from VL53L5CX driver?

  • August 12, 2024
  • 1 reply
  • 1287 views

Hi,

I have implemented the VL53L5CX driver for a Nordic controller, and it works fine.

Now, I want to implement the VL53L7CX driver for the same Nordic controller.

Can I use the VL53L5CX driver as is, or will I need to make changes?

Additionally, are there any hardware modifications required, or can I use the same hardware as with the VL53L5CX?

1 reply

Andrew Neil
Andrew NeilBest answer
Super User
August 12, 2024
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Associate
August 12, 2024

Hi,

so where i want to write 

uint8_t fw_flags[8];
    status |= vl53l5cx_dci_read_data(&Dev, fw_flags, 0xE0C4, sizeof(fw_flags));
    printf("Module type = %u (0 for vl53l5cx, 1 for vl53l7cx)\n", fw_flags[1]);

 

after init or before init of vl53l7cx?

using hardware it is possible to change the vl53l7cx address?

John E KVAM
ST Employee
August 12, 2024

The L5 and the L7 are identical bits of silicon. They only differ in the Field of View - which is a diffuser and lens change. 

Prior to boot, only the I2C interface is active, so issuing a complex DCI read is not going to work. One should do the Init first. Then issue your DCI read.

As for changing the I2C address, use this procedure:

Put all sensors in LPn =0. 

Bring the first one to LPn=1.

Do the init.

issue the address change command.

Update your address structure to access that chip at the new address. 

Bring up the next sensor and repeat the process of LPN=1, init, address change, update structure.

Technically you don't have to change the address on your last sensor, but I do it anyway. 

That way i can access the default address. If any of the chips have rebooted (due to lost power or something) they will again respond on the default address.