cancel
Showing results for 
Search instead for 
Did you mean: 

low power does not work with VL53L7CX multi-sensor setup

youcef
Associate II

I have two VL53L7CX Time of Flight sensors connected to a STM32F401CCU6. I was able to modify the X-CUBE-TOF VL53L7CX template to support both sensors, but I can't get low power mode to work for some reason. 

 

specifically, trying to use a sensor after calling:

CUSTOM_RANGING_SENSOR_Stop(Instance);

does not work. Even if I turn it back on with:

status = CUSTOM_RANGING_SENSOR_Start(Instance, RS_MODE_BLOCKING_CONTINUOUS);

It also seems to not be doing what it's supposed to either, as the system still draws a lot of current even when it's supposed to be in low power. This was not a problem with the single sensor setup


I've included all code that might be relevant here: https://github.com/youcefs21/multi-tof


if there is anything else I can clarify/test, let me know!

thanks

1 ACCEPTED SOLUTION

Accepted Solutions
youcef
Associate II

Never mind, it was a dumb pin issue on my end, my bad

View solution in original post

4 REPLIES 4
John E KVAM
ST Employee

I had a glance though your code, and what I don't see is how you changed the I2C address. (Although I must admit, I didn't look really closely.)

When the sensors power up, they are both at address 0x29 (or 0x52 write, 0x53 read). 

I'm guessing that when you initialized the sensors, both your instances went to the same address. 

The proper way to do this is. 

 - put both sensors into standby.

 - bring one out of standby and issue the "address change" command. then initialize it. 

 - bring the second one out of standby and initialize it. 

(Optionally, you can change the address of the second one. If the sensor ever reboots for some reason it will revert to 0x29 and you can detect it. It's a minor point.)

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

Hi, thanks for the reply.

The sensors are not connected to the same I2C pins, so I don't see why this is needed? sensor 1 is connected to I2C1 and sensor 2 is connected to I2C3. Should I connect them both to the same pins?

 

No - if they are on different busses then you are fine. Explains why i didn't see any code. Your way is easier.


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

Never mind, it was a dumb pin issue on my end, my bad