2025-11-05 6:55 AM - last edited on 2025-11-05 7:44 AM by Peter BENSCH
Hello everyone,
I would like to know if someone has ever tried to couple those two hardware components together?
I am currently using the STM32C092RC board to build an FD-CAN network, and I would like to exchange some real data — or more explicitly, to simulate some real scenarios.
Since the C092RC has an UNO shield connector, I thought I could easily use the VL53L8CX sensor on it.
But the platform.h file, which normally communicates with the hardware, is made for the STM32F4xx family.
So, is there any way to get the correct platform version for the STM32C0xx family? Has anyone ever tried this?
2025-11-09 3:26 PM
I wish it where that easy. But the MCU pins that are wired to the connectors are different.
But it's not impossible.
There are two ways to go about this.
One way to do it, would be to use the development environment and starting with your MCU board you can generate runnable code. And you can use this to configure all the pins you are going to need. You can include support for the VL53L1 shield board and you end up with runnable code.
It does take some effort to look at both the X-Nucleo board and the MCU board schematics, but it's not that hard.
But the code inserted using this method is not the most straight forward. The included code supports all the VL53 sensors and it's a bit of a trick traversing the jump tables and following along.
Another way to go is to build the code for the MCU board, but skipping the support for the VL53 sensors. This is pretty easy, but you are still going to have to configure the proper I2C pins and the XShut pin and the interrupt pin. So you still have to be able to read a schematic. Sorry about that.
Once you have the pins configured, bring in the VL53L1 UltraLite driver. Just copy the code into your project.
Once in, you can call the init function and issue the start and look at the returned data.
The calls are simple, and amazingly straight forward.
And this technique works for any of the VL53 sensors on any of the STM32 boards.
Good luck,
- john