cancel
Showing results for 
Search instead for 
Did you mean: 

register adresses

espen
Associate

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?

1 ACCEPTED SOLUTION

Accepted Solutions
John E KVAM
ST Employee

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. 


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.

View solution in original post

1 REPLY 1
John E KVAM
ST Employee

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. 


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.