cancel
Showing results for 
Search instead for 
Did you mean: 

What is the STM32CubeMX extension for ToF sensor VL53L1CB, with bare driver support?

AlexCloned
Associate III

After been testing VL53L3CX in my own board based in a STM32F407 micro, I want to test VL53L1CB now. But I am not wiring (satellite board) to a Nucleo board. I have connected it to my own board and trying to reformulate the project with STM32CubeMX. However I cannot find the right software support, neither in X-CUBE-TOF1 library nor in X-CUBE-53L1A2 which seems not to support a bare driver API for custom hardware.

Do you think I can use VL53L3 parent API, VL53LX, to support VL53L1CB?

1 ACCEPTED SOLUTION

Accepted Solutions
John E KVAM
ST Employee

The L3 and the L1 have basically the same program and you can get the L3 code to run on either L1.

But you will lose a lot and you would become a disaster to support.

Unfortunantely the L1X and the L1CB are not yet added to the CUBEMX.

So here is my suggestion to you.

Run the cubeMX and set it all up for the L3. Prove it runs.

Then carefully replace the L3 files the the L1X or L1CB files that you get from the bare driver.

The files are nearly the same

But if you choose the L1X UltraLite Driver, the files will be different, but there should be pretty much a one-to-one correspondence.

  • john

Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'

View solution in original post

3 REPLIES 3
John E KVAM
ST Employee

The L3 and the L1 have basically the same program and you can get the L3 code to run on either L1.

But you will lose a lot and you would become a disaster to support.

Unfortunantely the L1X and the L1CB are not yet added to the CUBEMX.

So here is my suggestion to you.

Run the cubeMX and set it all up for the L3. Prove it runs.

Then carefully replace the L3 files the the L1X or L1CB files that you get from the bare driver.

The files are nearly the same

But if you choose the L1X UltraLite Driver, the files will be different, but there should be pretty much a one-to-one correspondence.

  • john

Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'
AlexCloned
Associate III

Thank you John!

>>Run the cubeMX and set it all up for the L3. Prove it runs.

Ah, that was the first thing I did. However software hangs when initializing. With your advise in my hands my guess is that there is some minor "while(1) error management".

I guess also that those files to replace can be found in en.X-CUBE-53L1A2_v1.1.0.zip\Drivers\BSP\Components\vl53l1.

Thanks,

Alex.

John E KVAM
ST Employee

You are going to have to change the chip ID the software checks for.

I'll bet that's the issue.

  • john


Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'