Showing results for 
Search instead for 
Did you mean: 

Initialisation of the VL53L5CX failed.

Associate II

Hi, I read the question from 'Peter': VL53L5CX driver vl53l5cx_init() fails in the forum and wonder if downloading the firmware was successful. I am using a Rasberry Pi and used the Unosquare.WiringPi, C#.

There is no methode to write multiple bytes, like requested in the C demo API. So I write every firmware byte separately including the running register address, starting at 0. In the  /* Check if FW correctly downloaded */ part, the _vl53l5cx_poll_for_answer returns ok (0). But in the /* Get offset NVM data and store them into the offset buffer */ part, it fails on a timeout.

How can I check if the firmware was downloaded correctly?

Wil the methode writebyte(device_address, register_address, byte) work for the firmware download?

ST Employee

This sensor is not going to work if you access it byte-by-byte. First you need to download 83Kbytes to get it started (which woud be possible), but then you need to read at least a couple thousand bytes per range at a minimum. And you'd run out of time.

I find it interesting there is no multi-byte access. Perhaps this is just a teaching environment. A RPi is a full-blown Linux machine so it can do it. I'm thinking that until you write the multi-byte access, you don't have much of a chance.

But to answer your question, yes, your call would work. But the register address has to be a 2-byte address. Lots of small devices only use 1 byte here as they have few addresses.

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.