cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE not generating GPIO initialization code for SPI

JLesser
Associate

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.

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

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

View solution in original post

1 REPLY 1
TDK
Guru

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