cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L4CD soft reset or shutdown

Jason Mount
Associate III

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.

1 ACCEPTED SOLUTION

Accepted Solutions
John E KVAM
ST Employee

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.  

 


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.

View solution in original post

3 REPLIES 3
John E KVAM
ST Employee

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.  

 


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.
DavidEGrayson
Associate II
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
 

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


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.