cancel
Showing results for 
Search instead for 
Did you mean: 

vl53L3cx implementing in own STM32 project

sde c.1
Senior II

Hi,

I want to implement the vl53L3cx onto my own board , using CUBEIDE , HAL driver and an STM32G473CCT6 controller.

I have read dozens of documents, but it's quite overwhelming and not clear which API to use.

I have now implemented this API in my project : VL53Lx_API

The complementing documentation is VL53L0X_API_v1.0.4.4960_externalx.pdf .

This is already strange as my device is VL53L3 and not VL53L0

I can sum up al inconsistencies I occurred and put them in questions, but maybe its faster to ask for a guideline and links to documentation I need to implement this sensor in my own board.

What I want is

1)     Load the sensors firmware trough I2C at startup

2)     Using the correct API to communicate with the sensor

Thank you

Steve

4 REPLIES 4
John E KVAM
ST Employee

Oh dear, it was not supposed to be that hard.

I'm thinking the easist way to start over is to go to:

X-CUBE-53L3A2

VL53L3CX Proximity ToF sensor software expansion for STM32Cube

this project should enable to you to build a project.

If you use any of the STM32 processors, you can build the code using the STM32_CUBEMX application.

It allows you to select all your PIOs all your interfaces and your ToF sensor.

If you get it right, when you push the generate code button, you should have everything you need.

And if you get it wrong, you can re-configure your hardware design again using the graphical interface, and generate some more code.

then edit the code and put your code in the where it says "your code goes here". Actually is says User Init, and User program or something like that.

Read up on the STM32_CubeMX and see if works for you.

  • 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 Thank you.

We just decided to use VL53L5CX.

Fot this sensor i guess i need to follow these guidelines :

DM00844291.pdf and X-CUBE-TOF1 software expansion?

Steve

John E KVAM
ST Employee

I always recommend using the STM32CubeMX software if you have a STM32. It makes configuration of any STM32 much less difficult. We added support for the ToF sensors starting with the VL53L3 and VL53L5.

And that manual should lead you through all the steps you need to get up and running.

I wish I could say that it will take only a few minutes. But it's pretty complex.

However in the old days it took months to fully configure a complex ST processor. With CubeMX it's almost effortless.

Start with getting a good configuration on your process, you should be able to write 'hello world' or at least turn on an LED or two.

At that point, try integrating the ToF sensor.

It will take some work, but you should be able do it.

I followed that manual, and I was running in short order, but I had a hardware guy making sure my configuation of the I2C and the interrupt lines were correct.

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

I can't select any of the support options in cubeMx ?

Where can we get some support for this?

Monday and Thuesday we are at Embedded

World, maybe an STM32 support engineer can help us out?

0693W00000NrtsLQAR.png0693W00000NrtpWQAR.png0693W00000NrtqAQAR.png 

Thank you

Steve