cancel
Showing results for 
Search instead for 
Did you mean: 

Hi, I am looking for a SPI example for STM32H747IDISO discovery kit. I found one on GitHub but it is for Nucleo boards. Thanks, Louis

Louie88
Associate III
 
4 REPLIES 4

Code will be materially identical, pins may differ

Perhaps look at the pins used/available on the Arduino header for SPI signals/chip select.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Louie88
Associate III

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

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

Louie88
Associate III

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