cancel
Showing results for 
Search instead for 
Did you mean: 

Where is VL53L1_PRESETMODE_RANGING defined?

Wright.Simon
Associate III

UM2133 says that the available modes are VL53L1_PRESETMODE_RANGING, VL53L1_PRESETMODE_MULTIZONES_SCANNING, VL53L1_PRESETMODE_LITE_RANGING (Obsolete), VL53L1_PRESETMODE_AUTONOMOUS but the only definitions I can find (in API/core/inc/vl53l1_def.h in en.STSW-IMG007_v2.4.5.zip) are VL53L1_PRESETMODE_AUTONOMOUS (3), VL53L1_PRESETMODE_LITE_RANGING (4), VL53L1_PRESETMODE_LOWPOWER_AUTONOMOUS (8).

Please, what are the values I should use to provide the functionality described in UM2133?

3 REPLIES 3
John E KVAM
ST Employee

the VL53L1CB is a complex chip. We invented it to do a lot of stuff. Then, over time, we figured out what most people used and created the VL53L1X that only had the Autonomous mode.

So we have 2 different sensors - and the VL53L1CB is a super set of the VL53L1X.

To make matters worse, the L1X has two drivers - The 'full' driver (STSW-IMG007) and the UltraLite Driver (STSW-IMG009)

If you want the Full capability of the VL53L1CB (Sometimes shortened to the VL53L1 - but that's confusing with the L1X) you need the STSW-IMG019

API for VL53L1CB.

Note the VL53L1CB is a few cents more expensive than the VL53L1X.

Sorry about the complexity. We really had no intension of releasing the L1CB to the open market thinking that only some specific very high volume customers would want it. But we go so many requests that we released the part.

So read the descriptions of both parts. Decide if the extra complexity of the VL53L1CB is needed and if you want to pay the little bit extra. If so download the STSW-IMG019 software and you will get the extra features.

  • john

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.
Wright.Simon
Associate III

John, thanks so much, all is starting to become clear!

I guess I was confused because UM2133 talks about VL53L1, not VL53L1CB.

FYI I need the 'full' driver because I’m building an Ada binding to the C code, to run on e.g. STM32F4. So far I have managed to read a range using autonomous mode .. continues

Wright.Simon
Associate III

I’ve gone with the STSW-IMG009 driver, just what I needed.

Observations:

The header for VL53L1X_BootState() says it returns 1 for booted, but both of the chips I have return 3.

VL53L1X_SetInterMeasurementInMs() uses the magic number 1.075, while VL53L1X_GetInterMeasurementInMs() uses 1.065. Should be the same. Also, my chips have OSC_CALIBRATE_VAL == 0x26, clearly the proper value of the magic number must depend on this, is it temperature sensitive?