2022-01-26 12:56 PM
2022-01-26 01:18 PM
Code will be materially identical, pins may differ
Perhaps look at the pins used/available on the Arduino header for SPI signals/chip select.
2022-02-01 02:51 PM
Thanks for suggestion, I tried that, but the variable and constant names, the functions' parameters are slightly different int Nucleo board. I had to use the STM32CubeMX to generate a new project for SPI5, which is available on the ARDUINO connector.
The STM32CubeMX is a very nice program, but especially the clock configuration should also have a wizard, or a dialog. You just would type in (or select from available) CPU clock frequency and it would do the rest. I think it would be more useful than the (otherwise very nice) block diagram of the very complicated clock system.
Also, it would be very nice if STM32CubeMX would show the changes it made in a window. You could copy out the changes and manually and update the affected source code. Currently - if you allow - it will overwrite at least the main.c and the stm32h7xx_hal_msp.c files. Your code in main.c will be overwritten and lost. Not too good feature.
To overcome this I created a STM32CubeMXOutput project. If I need to add a new device to the program then I use the STM32CubeMXOutput project. This way I can keep my original code in safe, but I have to "investigate" what the STM32CubeMX changed. In some cases it is very complicated job.
Best regards,
Louis
2022-02-01 03:44 PM
> You just would type in (or select from available) CPU clock frequency and it would do the rest.
But CubeMX already does this... in a way. You select the bitrate divisor for SPI and it shows the frequency based on the SPI clock source (which you can track on that nice clock config view).
> You could copy out the changes and manually and update the affected source code.
Just check your previous version into git or other source control.
Compare with previous version and merge manually.
> To overcome this I created a STM32CubeMXOutput project.
I think that every Cube user does something of this sort.
2022-02-01 11:52 PM
Hi Pavel,
I suggested a new feature to avoid "checking the previous version". You are a step behind me. Thanks for the suggestions. These are what I did, I just hate it. If they showed the changes BEFORE they would change any source code, then it will be great help.
Best regards,
Louis