2018-11-16 05:53 AM
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:
???
Best regards.
Jesus
PS: I apologize my english.
2018-11-19 07:43 AM
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
2019-02-18 04:46 AM
Hi,
I have the same issue with my sensor, what was your error on the VL53L1_ReadMulti function ?
Thanks in advance.
Regards,
Elise
2019-02-19 12:08 AM
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.
2019-02-19 12:11 AM
2019-02-19 02:40 AM
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 ?
Regards,
Elise
2019-02-19 04:22 AM
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