cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to generate SPI HAL in STM32Cube for NUCLEO-G431KBT

WilliamT
Associate

Hi,

I'm trying to initiate an SPI interface through the MX view. When i'm saving and building the code from the .ioc file i only see INIT for GPIO and USART, none for SPI. Am i doing something wrong here? As i understand Cube should setup the HAL SPI automatically, is it something i'm missing?

See attached .ioc file

Thank you!

2 REPLIES 2
TDK
Guru

Yes, it should have an MX_SPI_Init call. Your post doesn't have an IOC file attached. Make sure you regenerate the code after adding SPI.

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

Hello @WilliamT and welcome to the Community 🙂,

Which STM32CubeMX version are you using?

Could you please share the .ioc file?

I made some tests with Nucleo-G431KB by using STM32CubeMX6.9.0 version and I don't found any issue.

When the code is generated, the MX_SPI1_Init(); is called automatically.

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.