Skip to main content
VBhag
Associate II
December 20, 2022
Solved

Trying to interface Vl53L1X with a TI controller. What does the response 0xA5 from the sensor mean?

  • December 20, 2022
  • 5 replies
  • 2821 views

I am trying to interface the VL53L1x sensor with a TI controller. I have checked the I2C read and write operations on the board, and they are working properly. The data sent and received over I2C are correct.

However, when I try to read Model_ID 0x010F or Module_Type 0x0110, the response I get is 0xA5. What does this value mean? I get this value for both the reads. I am not able to solve this issue. What could I possibly be doing wrong?

This topic has been closed for replies.
Best answer by John E KVAM

And here is the code itself.

5 replies

VBhag
VBhagAuthor
Associate II
December 21, 2022

Update - 0xA5 was a junk value in the memory. Basically, I am not getting any response from the sensor

John E KVAM
ST Employee
December 21, 2022

I'm going to guess that your I2C is not working as well as you think it does. And this is where most people have issues.

One must translate the platform.c file to work in your envionment. And that causes the issues.

Sometimes the I2C single byte reads and writes work, but byte swap issues kill you.

I'm going to add a bit of code. Place it just after you initialize your I2C. When you get this to work then you know the rest will work just fine.

And do try a GitHub search for your processor and the VL53L1. Chances are good that someone else has solved this for you.

John E KVAM
John E KVAMBest answer
ST Employee
December 21, 2022

And here is the code itself.

VBhag
VBhagAuthor
Associate II
December 28, 2022

John E KVAM : Thank you so much for the information and the code. It helped me fix a bug that was present in my platform interface layer. I am able to communicate with the sensor now.

hT.1
Associate
January 27, 2023

Hi john,

I am also working on TI controller , can you help me , how you developed platform.c file.

John E KVAM
ST Employee
January 27, 2023

The A5 does not come from the sensor. The A5 comes from your I2C driver telling you your transaction did not complete as expected.

if you are using an L1, L3, or L4 you can use the verification code above to insure your reads and writes are completeing successfully.

Common problems are byte swap, word swap, and inability to send longer sequences of bytes.

My go-to is to search GitHub and look for an existing project that uses a VL53L1, L3 or L4 and the MCU you are using.

If you don't find one, look for any project that uses your MCU and the I2C.

Then of course you will have to work out the issues.

Good luck;

  • john