cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L1 VL53L1_SetThresholdConfig

andreaspiezia9
Associate III

Hi all,

there is a way to set a Threshold for VL53L1  and keep the setting even if a power off / power on?

4 REPLIES 4
John E KVAM
ST Employee

​There is no user accessible Non-Volatile Memory (NVM) in the VL53L1 sensor. So no, there is no way to keep the threshold if the power is off.

The use case ST envisioned when they invented the sensor is that the sensor would continue to range when the MCU was in low power mode.

The sensor would then interrupt the MCU when the threshold was crossed.

Unfortunately when power is shutdown all the set up information is lost.

But try this...

When you are done ranging, change the Inter-measurement period to a very long time.

The sensor uses only 20 microAmps in the Inter-measurement period.

When you are ready to go again, simply change the Inter-measurement period back to what you had before 'shutting down'.

But if you shut down power completely, you will have to start over completely, and re-initialize the sensor.

  • 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.

John, Thank you for your answer.

LFour
Associate

Hello,

Just a little question: what about XSHUTDOWN signal? If we activate it when ranging is required and deactive it when no ranging is required. Is the re-initialization required?

Thanks,

Louis

John E KVAM
ST Employee

The XSHUTDOWN is almost exactly that - it turns off the chip. And when you turn it back on, you do need to go through the re-initialization step. If you just want to pause a while between ranges, use the Stop and Start commands. Then you will not need to re-initialize.


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.