2021-11-25 03:01 PM
I have a simple ranging project generated by CubeMX using X-Cube-TOF1 v2.0.0. The host is Nucleo-L452.
Initialization of the VL53L2CX appears to work without errors, however when the "VL53LX_run_device_test" function runs it fails after the timeout, returning -7 (timeout).
Please could you help to debug/resolve this issue.
Solved! Go to Solution.
2021-12-10 04:51 PM
I think I have found and resolved the issue.
The SATEL board was being powered from the Nucleo 5V rail. The Nucleo has 3.3V I/O. When I switched the SATEL board to use the 3.3V rail the sample application appears to work.
Sid
2021-11-26 01:17 AM
Hi Sid Price,
Have you tested with the pre-compiled project found in C:\Users\user_name\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-TOF1\2.0.0\Projects\NUCLEO-F401RE\Examples\53L3A2\53L3A2_SimpleRanging\Binary or it is a project created by you using CUBE-MX ?
Please note that the pre-compiled project has been built for the NUCLEO-F401RE only and can not be run on the NUCLEO-L452RE.
I don't have the NUCLEO-L452RE board with me to test for you, but if you have a NUCLEO-F401RE in your hand please try both the pre-compiled project and a new simple ranging created by your self using CUBE-MX, then I will able to assist you. Thanks, Julien
2021-11-26 06:57 AM
Hi Julien,
The project is generated by CubeMX for Nucleo-L452.
I do have a Nucleo-F401RE and I can try the binary and also generating a CubeMX project for it later today and report back.
Note that I am using the the VL53L3CX-SATEL breakout board for my project.
Regards,
Sid
2021-11-26 07:16 AM
Julien, the project binary is for 53L3A2, I am using 53L3CX, it is compatible?
Sid
2021-11-26 08:48 AM
Hi Julien,
I discovered the 53L3CX examples under the "Custom" folder and loaded the 53L3CX simple ranging example into CubeIDE. I built and ran it and it fails in exactley the same place as my Nucleo-L452 project, i.e. when the "VL53LX_run_device_test" function is called. It fails with error code "-13."
Sid
2021-11-26 11:30 AM
Hi Sid, if you are using the blue color VL53L3CX-SATEL PCB delivered with the X-NUCLEO-53L3A2 you need to add to pull up resistors ( 2.2k to 4.7 k ohms) on the SDA and SCL lines. If you use the green color VL53L3CX-SATEL PCB sold separately you don't need to add the pull up resistors. Julien
2021-11-27 06:30 AM
Hi Julien, I have the separate SATEL PCBs (green).
I2C appears to be working correctly the ID of the 53L3CX is read and there are many I2C interactions before the project attempts to run the test code.
Sid
2021-11-30 08:09 AM
@Julien NGUYEN I am still stuck on this issue, both Nucleo-L452RC and Nucleo-F401RE show the symptom. As I said, it does not appear to be an I2C issue because the device is identified through I2C and other commands as part of the setup work.
Sid
2021-11-30 08:30 AM
Hi Sid, Could you please send me a picture of the connection you did between the VL53L3CX-SATEL and the Nucleo-F401RE ?
Have you connected the XSHUT pin to the PA1 and the GPIO1 pin to the PA4 as shown below ? Julien
2021-12-04 08:51 AM
@Julien NGUYEN Excuse my delayed response, the forum does not send me a notification when a new post is made. Is there a setting for that?
My hookup looks the same as yours.