Skip to main content
AlexCloned
Senior
December 20, 2021
Solved

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

  • December 20, 2021
  • 3 replies
  • 1780 views

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?

This topic has been closed for replies.
Best answer by John E KVAM

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

3 replies

John E KVAM
John E KVAMBest answer
ST Employee
December 20, 2021

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
AlexCloned
Senior
December 20, 2021

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
December 20, 2021

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

I'll bet that's the issue.

  • john