cancel
Showing results for 
Search instead for 
Did you mean: 

Vl53L3CX and X-CUBE-TOF1 v2.0.0 issue

Sid Price
Senior

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Sid Price
Senior

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

View solution in original post

11 REPLIES 11
Julien NGUYEN
ST Employee

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


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

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

Julien, the project binary is for 53L3A2, I am using 53L3CX, it is compatible?

Sid

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

Julien NGUYEN
ST Employee

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


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Sid Price
Senior

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

Sid Price
Senior

@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

Julien NGUYEN
ST Employee

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

0693W00000GZWwfQAH.png


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Sid Price
Senior

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

0693W00000HnYBJQA3.png