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

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. It helps the next guy.

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

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. It helps the next guy.
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


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. It helps the next guy.