2023-10-30 9:09 PM
Hi guys!
From the last week I am trying to connect my TOF sensor with the STM32, but the I2C Communication has not been started. I have tried to use I2C Scanner to scan the address of the VL53L7CX SATEL breakout board but was not even able to gets its address back. I also tried changing the VL53L7CX SATEL breakout board but it was also not very useful. I have tried using both the STM32 Cube Ide software package that they provide for the TOF Sensosrs and the STM32duino VL53L7CX Library but was unsuccessful in making them work.
Can anyone let me know if I am making any mistakes or if my approach is wrong in any way!
Thank you in advance!
Solved! Go to Solution.
2023-11-03 7:33 AM
This is what you want to do.
Start with the STM32CubeMX software. Download a new copy if it's been a while. At the start put in your board name. It will bring in lots of code. Then start configuring the hardware the way you want. Generally it's done for you if you are using an ST board. Next start adding in the XCUBE-ToF1 code. There are youtube videos on how to do this.
https://www.youtube.com/watch?v=IjW6pcT8sGM
this video does NOT use your board, nor is it the right sensor, but what you need to do is the same as far as plumbing goes.
the real trick is that the XCubeToF1 does not know which I2C you are using so that has to be configured along with the GPIO you use for board reset and interrupt.
To get the plumbing right you are going to need the schematic of the board and of the sensor board. Both are available on ST.com.
Good luck.
2023-11-01 2:50 AM
Could you provide more information about your settings?
Are you using a nucleo board?
2023-11-01 10:43 AM
I am using an L432 KC Nucleo board to connect with the SATEL VL53 CXL7 but am unable to connect. I have tried to use I2C Scanner to get the address of the sensor but was unable to get an address.
2023-11-03 7:33 AM
This is what you want to do.
Start with the STM32CubeMX software. Download a new copy if it's been a while. At the start put in your board name. It will bring in lots of code. Then start configuring the hardware the way you want. Generally it's done for you if you are using an ST board. Next start adding in the XCUBE-ToF1 code. There are youtube videos on how to do this.
https://www.youtube.com/watch?v=IjW6pcT8sGM
this video does NOT use your board, nor is it the right sensor, but what you need to do is the same as far as plumbing goes.
the real trick is that the XCubeToF1 does not know which I2C you are using so that has to be configured along with the GPIO you use for board reset and interrupt.
To get the plumbing right you are going to need the schematic of the board and of the sensor board. Both are available on ST.com.
Good luck.
2023-11-14 6:30 AM
Hello,
To help you for the connection, you can have a look to the AN5883. Indeed it explains how to connect the SATEL to a F401 but it can help to know which signals are mandatory for the connection.
Regards
Anne
2025-06-20 1:44 AM
I had the same problem. I wanted to flash an example from en.X-CUBE-TOF1 project family to NUCLEO F401RE. The .bin file example VL53L7CX_SimpleRanging (which I wanted to use), the PWR_EN pin was apparently not correctly triggered. I connected the PWR_EN pin directly to 3V3 instead of the specified pin, and it started working.
2025-06-20 7:52 AM
That is incredibly clever of you.
All the STM32s are similar, but each MCU has a different pin out. So the GPIO we chose to use on the Nucleo F401RE was different. from the on your board.
But apparent the same pins were used of the I2C, and to run this chip all you really need is power, ground and an I2C. Once you have the power suppled you were all set.
I'm truly impressed.
- john
2025-06-23 1:21 AM
Thank you for the kind words John!
I also ran it on Nucleo F401RE, so the pinout is supposed to be the same. It's just that the .bin example I got from ST apparently had a bug in it, not triggering the PWR_EN pin correctly. I first tried to measure all pin levels on the SATEL board, and figured out the PWR_EN is low. Connecting it directly was the first workaround I tried before going to re-build the firmware and doing the entire pin assignment from scratch, and it worked.
- Luka