Skip to main content
Jason Mount
Associate III
September 29, 2024
Solved

VL53L4CD soft reset or shutdown

  • September 29, 2024
  • 2 replies
  • 909 views

How do you perform a soft reset on the VL53L4CD if XSHUT is not used?  I can't seem to find an example.  I see the VL53L4CD_ULP_SOFT_RESET or VL53L4CD_SOFT_RESET is defined, but I don't know what to write to it.

Also, how do you shut the sensor down without XSHUT, is telling it to StopRanging enough?

Thanks.

Best answer by John E KVAM

There are two parts to the sensor - one is the I2C interface and the other is the ranging engine. 

Writing a '1' to the soft reset will reboot the ranging engine - but you should not need to do that. 

The Xshut pin will indeed shutdown the entire sensor. But unless you want to hold it in reset for some reason - like changing the I2C address of a different sensor - you should not need to do that either. 

Simplest way to operate is simply to tell the sensor to stop ranging. The ranging engine will stop. The I2C interface will still be running, and you can issue the restart at any time. It will take off from where you were. All settings intact.

It does consume some power while stopped as we are keeping the memory and the I2C alive. But it's really minor.  

 

2 replies

John E KVAM
John E KVAMBest answer
ST Employee
September 30, 2024

There are two parts to the sensor - one is the I2C interface and the other is the ranging engine. 

Writing a '1' to the soft reset will reboot the ranging engine - but you should not need to do that. 

The Xshut pin will indeed shutdown the entire sensor. But unless you want to hold it in reset for some reason - like changing the I2C address of a different sensor - you should not need to do that either. 

Simplest way to operate is simply to tell the sensor to stop ranging. The ranging engine will stop. The I2C interface will still be running, and you can issue the restart at any time. It will take off from where you were. All settings intact.

It does consume some power while stopped as we are keeping the memory and the I2C alive. But it's really minor.  

 

Associate II
May 15, 2025
I too am interested in soft-resetting the VL53L4CD, just so I can be sure all the settings have gone back to their original states.  It looks like the same procedure that is used for the VL53L1X in the official code samples also works for the VL53L4CD:

1. Write 0 to 
SOFT_RESET
2. Delay 100 microseconds
3. Write 1 to SOFT_RESET
4. Delay 1200 microseconds
 
John E KVAM
ST Employee
May 15, 2025

Probably should have created a new ticket for this, but you are exactly right. 

It will work just fine. 

We don't really advertise the soft reset. We would rather you drop the XShut line and really start all over as this clears any I2C issues as well. But it you can write the command, it will work.

- john