Skip to main content
Associate II
February 8, 2025
Question

VL53L1_ERROR_ZONE_GPH_ID_CHECK_FAIL

  • February 8, 2025
  • 2 replies
  • 649 views

We found a problem with VL53L1CB, After VL53L1_GetMeasurementDataReady returns 0, VL53L1_GetMultiRangingData returns VL53L1_ERROR_ZONE_GPH_ID_CHECK_FAIL. What causes this problem?

Thank anyone for a little help

2 replies

John E KVAM
ST Employee
February 10, 2025

I think you want VL53L1_GetMeasurementDataReady to return a 1 to indicated that a measurement was ready. 

I believe that error will go away once the measurement is actually ready. Although I did not find any useful references to it in the code. (There is just the function that translates the error to a string - which is not really helpful.)

Try starting the sensor and waiting a good long (At least whatever you have set for Timing Budget) time before calling VL53L1_GetMeasurementDataReady. You will know the sensor has finished, and you will know what VL53L1_GetMeasurementDataReady is supposed to return when done.

- john

User.120Author
Associate II
February 11, 2025

Thank you very much for your response.

VL53L1_GetMultiRangingData(VL53L1_DEV Dev, VL53L1_MultiRangingData_t *pMultiRangingData) *pMultiRangingData in this function returns 1, I also waited until *pMultiRangingData was 1 before executing VL53L1_GetMultiRangingData. So I don't know why this result is returned.

In addition, I want to determine whether the ranging performance under the drive of STSW-IMG019 is LONG>MEDIUM>SHORT. I see MEDIUM>LONG>SHORT in um2133, and the actual test is LONG>MEDIUM>SHORT.

Thank anyone for a little help

 

Zhiyuan.Han
Technical Moderator
June 19, 2025

Hi 

About the code sequence, I attach the example code here, you need to check NewDataReady with VL53L1_GetMeasurementDataReady(), if the NewDataReady return 1, that means ranging data ready, and you can read the ranging data VL53L1_GetMultiRangingData().

 do{ // polling mode
 status = VL53L1_GetMeasurementDataReady(Dev, &NewDataReady);
 HAL_Delay(1);
 if((!status)&&(NewDataReady!=0)){
 status = VL53L1_GetMultiRangingData(Dev, pMultiRangingData);
 no_of_object_found=pMultiRangingData->NumberOfObjectsFound;
 printf("Count=%5d, ", pMultiRangingData->StreamCount);
 printf("#Objs=%1d ", no_of_object_found);
 for(j=0;j<no_of_object_found;j++){
 if(j!=0)printf("\n ");
 printf("status=%d, D=%5dmm, Signal=%2.2f Mcps, Ambient=%2.2f Mcps",
 pMultiRangingData->RangeData[j].RangeStatus,
 pMultiRangingData->RangeData[j].RangeMilliMeter,
 pMultiRangingData->RangeData[j].SignalRateRtnMegaCps/65536.0,
 pMultiRangingData->RangeData[j].AmbientRateRtnMegaCps/65536.0);
 }
 printf ("\n");
 if (status==0){
 status = VL53L1_ClearInterruptAndStartMeasurement(Dev);
 }
 }
 }
 while (1);

 

Br

Zhiyuan.Han

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.