2024-02-21 10:39 AM
Hello everybody,
I have connected a SATEL-VL53L8 board to my ESP32, and I am trying to run the basic ranging example, using ULD driver. When I run the example, I get VL53L8CX ULD Loading failed in the serial terminal. Trying to figure out what's wrong, I have connected a logic analyzer to the SPI bus, so here is what I know so far:
Any help on this issue would be highly appreciated.
Kind regards
2024-02-21 01:33 PM
If your code were successfully downloaded the _vl53l8cx_poll_for_mcu_boot would pass. It's not.
The code tries to boot when the last byte of program space is written.
So, either the code was not completely written, or it wasn't written correctly.
The first thing to check is if your MCU can write a 32K chunk all in one go.
Many of them cannot.
Might want to check the status of all those I2C writes and make sure they pass.
You got the 'Is_Alive' message, so your I2C is working, and the chip is out of reset.
You are close.
-john
2024-02-22 07:41 AM
Hi John, and thanks for your answer.
Actually, it's using SPI communication. As far as I can see from the logic analyzer, the size of the code chunks is not an issue, and the values sent correspond to those in the VL53L8CX_FIRMWARE lookup table.
Unfortunately unlike I2C, there is no ACK on the SPI bus, so there is no way to check if every single byte of the firmware has been accepted by the slave device. Ca you please explain how this part of code /* Check if FW correctly downloaded */ works?
Kind regards
2024-02-22 09:16 AM
the check for booted simply queries a location that changes when the code gets running.
No change -> no running code.
What speed are you running your SPI? I read a different post that said that if you run the SPI too slowly, the sensor interface does NOT work. As odd as it seems, try speeding up the SPI bus.
See the post at:
Re: VL53L8CX firmware loading over SPI fails if it... - STMicroelectronics Community
It's all I can think of.
- john
2024-02-22 11:54 AM
The clock frequency was 250kHz previously, now it's 1MHz, but still to no avail.
If I'm not mistaken, this sequence should read the FW checksum, and the value is 0x00000000.
I'm running out of ideas at this point...
2024-05-28 07:10 AM
Hello,
There was an issue inside the ULD as low frequency.
It has been fixed in the latest version (v1.2.2) of the ULD available here.