2025-04-25 2:04 PM
Hi, i am trying to connect the nrf54L15 with the VL53L4CD sensor. I am having trouble with library and the code. Struggling with connecting the nrf54L15 to the sensor in the different libraries. Are you able to share the different register adresses for the VL53L4CD sensor? Do you have an examples using the nrf54L15 and or device tree with the VL53L4CD?
Solved! Go to Solution.
2025-04-28 10:35 AM
I think ST would go crazy if I started writing code for some processor other than the STM32. But the register addresses are not going to help. You have an I2C issue.
The code - as delivered - has a platform.C file - but it's basically empty. It's your job to do the last bit of plumbing.
Modify the platform.c file so that the functions work on your MCU. WrByte(), RdByte(), WrWord, RdWord etc.
One can search github to see if someone else has done it.
But it's pretty standard stuff - with one exception! The VL53 sensors use two-byte addressing.
So, on the bus, the sensor address is sent (0x52) then TWO bytes of register address, then the data.
Most sensors only have one byte of register address.
So, if you have other I2C devices on the bus, it gets a little tricky. Might need two I2C access functions.
Another issue (that I don't think you need to worry about on your Nordic MCU) is byte-endianness.
The sensor is Big endian. The STM32 (and other ARM MCUs) are little endian. So, byte-swap and word-swap are issues.
2025-04-28 10:35 AM
I think ST would go crazy if I started writing code for some processor other than the STM32. But the register addresses are not going to help. You have an I2C issue.
The code - as delivered - has a platform.C file - but it's basically empty. It's your job to do the last bit of plumbing.
Modify the platform.c file so that the functions work on your MCU. WrByte(), RdByte(), WrWord, RdWord etc.
One can search github to see if someone else has done it.
But it's pretty standard stuff - with one exception! The VL53 sensors use two-byte addressing.
So, on the bus, the sensor address is sent (0x52) then TWO bytes of register address, then the data.
Most sensors only have one byte of register address.
So, if you have other I2C devices on the bus, it gets a little tricky. Might need two I2C access functions.
Another issue (that I don't think you need to worry about on your Nordic MCU) is byte-endianness.
The sensor is Big endian. The STM32 (and other ARM MCUs) are little endian. So, byte-swap and word-swap are issues.