Skip to main content
JLesser
Visitor II
June 29, 2021
Solved

STM32CubeIDE not generating GPIO initialization code for SPI

  • June 29, 2021
  • 1 reply
  • 1857 views

I am using a Nucleo H743ZI2 with the CubeIDE and while it does generate code to initialize the SPI peripheral itself, it does not generate code to configure GPIO pins as the SPI alternate function. This is despite the fact that the GPIO pins for SPI are shown green on the Pinout & Configuration window and it is able to generate code for other GPIO pins, like the pins connected to the LEDs.

This topic has been closed for replies.
Best answer by TDK

It probably does and you're not looking in the right spot.

Pin initializations are found in the HAL_SPI_MspInit function within stm32f7xx_hal_msp.c by default.

Attach your IOC if that's not the case.

1 reply

TDK
TDKBest answer
June 29, 2021

It probably does and you're not looking in the right spot.

Pin initializations are found in the HAL_SPI_MspInit function within stm32f7xx_hal_msp.c by default.

Attach your IOC if that's not the case.

"If you feel a post has answered your question, please click ""Accept as Solution""."