cancel
Showing results for 
Search instead for 
Did you mean: 

Histogram generation loop - VL53L3CX

v++
Associate II

Hello Community,

I do agree we don't need to write the code as API is well updated, but to understand my output properly I could really use your help on understanding bits of the histogram loop.

  1. if ((pMultiRangingData->StreamCount & 1) == 1) ---> what does StreamCount refer to ?
    1. How does this loop handle ambient light ?
    2. why does the signals always start from bin index 4 ? Can this be changed ?

If you could point me to docs on it I am happy to read further

Thank you

V++

4 REPLIES 4
Zhiyuan.Han
ST Employee

Hi V++

StreamCount is a 8-bit integer gives a counter incremented at each range. The value starts at 0,

incrementing 1 by 1 up to 255. When it reaches 255, it starts again from 128 to 255. you can print it out to easy your understanding.

AMB is similar handled with return signal rate, the difference is AMB IS collected during VCSEL stop emitting.

F​or the signal bin topic, the purpose is to leave buffer for short distance. this is fixed, not able to change.

At last, seems your shred 1 line code was modified, I can't find it in office release package.

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.

Hi Thanks for your attention on this. Was starting to think it was stalled but finally had your response.

first you’re right the snippet didn’t come with the office release package. However it was put together from related posts on this community which I gathered. Also after further looking into the code and reading accompanying documentation I found that the stream count is only needed when ranging in interrupt mode.

what I currently need help with, and if you have the answer of course is, I realised the histogram bins with returned signals are spread across 3bins out of the 20bin from the zone. Can you confirm if this variable is modifiable from the release package? If yes please share the method/api for this if I can modify from the package.

if not, please give me some explanation as to why. this

thanks for taking a look at this post.

v++

v++
Associate II

Some clarity to this is can I possibly choose to generate histograms of bin width 20mm instead of 20cm for instance?

Zhiyuan.Han
ST Employee

Hi V++

For the histogram bin width, it is a fix valued defined by device HW, it's not configurable.

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.