Skip to main content
jspiller
Associate II
June 1, 2022
Question

Has anyone been able to get the ULD for the vl53l5cx running in zephyr. I believe my I2C transfers are correct yet it times out on the poll_for_answer.

  • June 1, 2022
  • 3 replies
  • 3199 views

Here is my platform.c file that I have been using:

This topic has been closed for replies.

3 replies

John E KVAM
ST Employee
June 9, 2022

I was hoping someone else would chime in, as I really have no idea what a Zephyr is. The web site wasn't exactly helpful.

But if it's a Linux class machine, one really should start with i2cdetect.

If it's an MCU, then you have to find some way to 'ping' the sensor. Knowing it's alive is the first step.

Can you call the VL53L5CX_is_alive?

It will at least determine if your I2C is communicating. 0693W00000NrXBtQAN.png

jspiller
jspillerAuthor
Associate II
June 10, 2022

I ended up solving my issue, I was not incrementing the register address after each loop in WrMulti. I didn't find the documentation very helpful for how the sensor expects its I2C data to be transmitted, or how the init function writes to certain registers (i.e. 0x7FFF) and does not explain which register that is, and what the command is doing. As well there is an incorrect diagram in the datasheet for this sensor for sequential write which also lead me to some troubles in figuring this out. Zephyr is an RTOS that is closely integrated with nordic boards.

Regards,

Jacob

John E KVAM
ST Employee
June 10, 2022

Well done.

I got a complaint about the extra stop bit in the documentation in another thread just last week. It will be fixed ASAP. VL53L1, L3, L4 and L5 are all affected.

That big 80K load is the software that runs the senosor.

Writting that last byte, 7fff is what triggers the "Load is done, boot the sensor."

And there are so many MCUs that have limits on the I2C write length, I really asked for an example that shows a multi-I2C command to do the load as an example. Apparently it did not get done. Sorry about that.

  • john