cancel
Showing results for 
Search instead for 
Did you mean: 

I get the same histogram data every time on VL53l3cx

DMehr.2
Associate II

As shown below, the first line is the distance and the rest are histogram data whci I think is same and not correct?

103

-4652409,-2097499426,1344930034,1327221713,525211626,33064954,-17059034,235676156,1093868795,138478570,-1947005701,2044266306,-979944,-1949171152,-370016190,-918125440,-1313692902,250674939,1125191931,138674666,-1594359557,1020856133,-983015,-1596849613,

85

-4652409,-2097499426,1344930034,1327221713,525211626,33064954,-17059034,235676156,1093868795,138478570,-1947005701,2044266306,-979944,-1949171152,-370016190,-918125440,-1313692902,250674939,1125191931,138674666,-1594359557,1020856133,-983015,-1596849613,

80

-4652409,-2097499426,1344930034,1327221713,525211626,33064954,-17059034,235676156,1093868795,138478570,-1947005701,2044266306,-979944,-1949171152,-370016190,-918125440,-1313692902,250674939,1125191931,138674666,-1594359557,1020856133,-983015,-1596849613,

This is the code snippet I am using

  VL53LX_GetAdditionalData(VL53L3A2_DEV_CENTER,pAdditionalData);
                 							for (int j=0;j<24;j++){
                 								printf("%ld,", pAdditionalData->VL53LX_p_006.bin_data[j]);
                 							}
                 							printf("\n");
 

2 REPLIES 2
John E KVAM
ST Employee

There is no way to get the same data if in fact you are ranging. For some reason you stopped ranging.

You should call

VL53LX_GetMeasurementDataReady() - this will stall until the data is ready

Check the RangeStatus to insure you got a good range

VL53LX_GetAdditionalData() this will get the histogram data.

VL53LX_ClearInterruptAndStartMeasurement() - to start the next range.

if your VL53LX_GetAdditionalData() continues to return the same data, you have not completed the next range.


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.
DMehr.2
Associate II

I think the problem might lie in me using the VL53L3A2_DEV_CENTER as I think it has the value 0 and not the proprer address which is required? I have trouble finding what to use instead of that. Could you maybe point me in the right direction? I am using the eval board and fr401e board for this.