cancel
Showing results for 
Search instead for 
Did you mean: 

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

AlexCloned
Senior

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

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.

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

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.
AlexCloned
Senior

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


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.