cancel
Showing results for 
Search instead for 
Did you mean: 

How to install VL53L3CX Linux Driver to a Raspberry Pi 3?

ODufo.1
Associate II

Hello,

I've just bought a VL53L3CX board and connected it to a Raspbery Pi 3 B+.

I downloaded the Linux Driver "en.VL53L3CX_LinuxDriver.zip" but I can't find any document explaining how to install this driver?

Any help is welcome.

7 REPLIES 7
John E KVAM
ST Employee

Do you really need the Linux driver? The easy way to get a RPi application to run is to use the bare driver in user mode.

A user mode application is much easier to use, but you do need access to the I2C driver.

Our cell-phone customers wanted the Linux driver because they didn't want to give user access to the I2C.

If you use the bare driver, you need only to verify that the platform.c works, and you should be up and running.

  • john

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question. It helps the next guy.
ODufo.1
Associate II

I was thinking the Linux Driver was an easiest way to drive it.

I can use the bare driver in user mode.

I've just download "en.en.bare_driver_VL53L3CX.zip": it seems easy to start with.

Thank you,

Olivier

John E KVAM
ST Employee

I uploaded a program I was running on the RPi, using the UltraLight driver.

You could start with this.

Just add the latest UltraLight Driver from the ST web site. Search for VL53L1X UltraLite Driver.

The GPIO4 is how I control the Xshut pin. Not totally required, but handy.

  • john

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question. It helps the next guy.
ODufo.1
Associate II

Thank you for the program, but I still can't use the sensor.

The vl53l3cx is detected at 0x29 address but I don't understand why the result of i2cdump doesn't provide the right Model_ID (0xEA) and Module_Type (0xAA)

I tested it with two eval boards "VL53L3CX-SATEL": result is the same.

Do you have any idea about this behaviour?

0693W000001s7sRQAQ.png

John E KVAM
ST Employee

It's odd that I've never tried an i2cdump command. There are thousands of registers on that chip and I suspect you would find the EA somewhere in there somewhere. In our previous chip (VL53L1) it was at address 0x111. But there are pages, and the ID is on the NVM page and not in the RAM page you are looking at.

The fact that you got a response from address 0x29 means you have correctly hooked up the sensor.

Oddly you can run the L1 ULD driver code on an L3 - It will NOT give you very good values, but it will run and return a somewhat accurate answer.

run the code I sent, plus the ULD and you should get some numbers.

Then use the VL53L3 driver and the same main.c

It should work and give you more accurate numbers.

  • john

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question. It helps the next guy.

Hi

How do you use the bare driver under the linux system?

Thanks

Best regards

william

HI John

I am william. I want to run the VL53L3CX LINUX DRIVER in Android. But it don't work. The error information is "slave address not acknowledged". I'm sure i correctly connect my board. I only buy the VL53L3CX-SATEL board but no  X-NUCLEO-53L3A2 board. Do you have any idea about this?

Best Wishes

William