2023-05-07 09:47 AM
Hi.
I'm using PlatformIO with stm32duino with a NUCLEO-L476RG. I finally figured out how to configure the clocks in CubeMX and then copy the "void SystemClock_Config(void)" function into my main.cpp code and it seems to work great.
One question I have is, should I also copy other parts of code generated by CubeMX for i2c or spi?
Thanks
2023-05-07 10:18 AM
Or you could just code it directly?
There are HAL libraries and examples. Perhaps use those and the Reference Manual to understand the hardware.
The output from CubeMX can be a template. A lot of the output is superficial, look at pin and peripheral initialization hidden in MSP files. You can collect this together