Skip to main content
Visitor II
November 16, 2018
Question

VL53L1´S API implementation for Microchip devices: Doubts.

  • November 16, 2018
  • 6 replies
  • 1224 views

Hi friends,

I´m trying to include a Vl53l1 in my project. I am working with a PIC32MX440 microntroller.

I have filled with correct functions in the files vl53l1_platfom.h and .c to use the APIs with my hardware.

The commication with the sensor is right, the microcontroller can read and write in to the sensor, everything goes well...

I have read the ST APIs manual (UM2356), I have write the recomended calls to start to measure distances, the program works but the range I get isn´t correct, I always get the same result (0x196). I am using the sensor without calibration, I think this behavior is for that reason. Maybe?

So I am trying to execute a calibration process. I have followed the manual (UM2356), but when I try to run the Offset calibration I get the next error:

VL53L1_ERROR_GPH_SYNC_CHECK_FAIL

I am blocked, because I can´t measure and can´t calibrate the sensor.

I have two doubts:

  1. Can I use the sensor without calibration?
  2. What is the meaning of the error VL53L1_ERROR_GPH_SYNC_CHECK_FAIL?

???

Best regards.

Jesus

PS: I apologize my english.

    This topic has been closed for replies.

    6 replies

    Visitor II
    November 19, 2018

    Dear friends,

    I have found the problem, I had a bug in the routine:

    VL53L1_Error VL53L1_ReadMulti(VL53L1_DEV Dev, uint16_t index, uint8_t *pdata, uint32_t count) 

    I have fixed the mistake. The ST´s APIs work fine.

    it seems I can use the sensor without calibration.

    Thanks and best regards.

    Jesus

    Visitor II
    February 18, 2019

    Hi,

    I have the same issue with my sensor, what was your error on the VL53L1_ReadMulti function ?

    Thanks in advance.

    Regards,

    Elise

    Visitor II
    February 19, 2019

    Hi Elise,

    I wrote some wrong lines in the function, the sensor wasn´t able to communicate with the uC.

    My code didn´t follow the next structure:

    The others vl53l1_platform´s function were implemented without problems, and the sensor replied something, so I thought the problem was in the sensor... ;)

    It was my fault. I had to check the communication with a Logic Analyzer.

    Best regards.

    Visitor II
    February 19, 2019

    This is the communication struture:

    Visitor II
    February 19, 2019

    Hi Jesus,

    Thank you for your quick answer.

    I'm using ST platform code from their example and it seems to go right, It's following the communication structure I think. Could you possibly share with me your platform code ? By private message maybe ?

    0690X000006Dh96QAC.png

    Regards,

    Elise

    Visitor II
    February 19, 2019

    Hi Elise,

    If you are using the ST´s platform the communication process should be functional. The communication you have attached above seems right. The problem may be in the sensor, is it right? Can you use another sensor?

    I am sorry to inform you I can´t share code (company policy).

    Regards,

    Jesus