cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L7CX - Resetting sensor(s) without power cycling after they have initialized with ULD init()

jairo1
Associate II

Hello, we have a system that consists of 12 VL53L7CX sensors each, on 4 different I2C busses and we are using an I2C address translators (LTC4316CDD) to address them all without needing to change their address dynamically. We are using ST's ULD (ultra-light driver) to interface with them.

One challenge we are running into during application development, is that after we initialize all 12 sensors and start ranging, if we restart the microcontroller application we are sometimes unable to re-initialize the sensors - the `vl53l7cx_init()` call fails somewhere.

Our current test setup makes it difficult to power cycle just the sensors because doing so also power cycles the host computer.

My questions are:

  1. Is there an I2C register (or set of registers) that I can access to check if the sensor has been previously configured and if it's actively ranging? This would be helpful to avoid spending time re-initializing if we don't need to.
  2. Also, is there an I2C register that I can write to "reset" the sensors so that I can recover a failed init? 

Thank you,

Jairo

1 ACCEPTED SOLUTION

Accepted Solutions
EliasB
ST Employee

Hi Jairo,

Apologies for the late response.

I discussed your questions internally and below are the answers:

1) Is there an I2C register (or set of registers) that I can access to check if the sensor has been previously configured and if it's actively ranging? This would be helpful to avoid spending time re-initializing if we don't need to.

There is no register that can be used to check if the sensor is currently configured or actively ranging. One way would be to poll the sensor or check for an interrupt which indicate that the sensor is still running. Another way is to, after initializing, check the sensors i2c address. If any of them come back as the default of 0x52, then you know that particular sensor was not configured to range as you intend. If the sensor returns other than 0x52, then that sensor is most likely still configured and ranging as you expect. They all must have an address other than the default 0x52.

2) Also, is there an I2C register that I can write to "reset" the sensors so that I can recover a failed init? 

No, unfortunately there is no register that can be written to reset the sensor.

Hope this helps. Feel free to let me know if you have other questions.

 

Elias

 

 

View solution in original post

4 REPLIES 4
jairo1
Associate II

Hello, I just wanted to follow up on this question - perhaps someone from ST can help?

jairo1
Associate II

I apologize for the noise, but wanted to tag a few people I've seen active in this forum recently: @michaeltang , @John_Kvam or @Zhiyuan.Han 

EliasB
ST Employee

Hi Jairo,

Apologies for the late response.

I discussed your questions internally and below are the answers:

1) Is there an I2C register (or set of registers) that I can access to check if the sensor has been previously configured and if it's actively ranging? This would be helpful to avoid spending time re-initializing if we don't need to.

There is no register that can be used to check if the sensor is currently configured or actively ranging. One way would be to poll the sensor or check for an interrupt which indicate that the sensor is still running. Another way is to, after initializing, check the sensors i2c address. If any of them come back as the default of 0x52, then you know that particular sensor was not configured to range as you intend. If the sensor returns other than 0x52, then that sensor is most likely still configured and ranging as you expect. They all must have an address other than the default 0x52.

2) Also, is there an I2C register that I can write to "reset" the sensors so that I can recover a failed init? 

No, unfortunately there is no register that can be written to reset the sensor.

Hope this helps. Feel free to let me know if you have other questions.

 

Elias

 

 

Hi Elias, thank you for the response.

Unfortunately for our system, we don't change the i2c address of the devices, we use a hardware i2c address translator to address them at different addresses. We also didn't route the interrupt signal, nor the reset signal so we were hoping for a solution via i2c.