Skip to main content
Associate III
September 6, 2024
Question

SPI Between two nucleo boards mcu

 

I am trying to establish communication between two Nucleo boards (STM32G431RB as master and Nucleo F446RE as slave). I used the example codes from the STM32 GitHub page (NUCLEO-G431RB/Examples/SPI/SPI_FullDuplex_ComPolling_Master and STM32F411RE-Nucleo/Examples_MIX/SPI/SPI_FullDuplex_ComPolling). I made some changes to the slave code, including GPIO settings, but the communication still doesn't work. I chose NSS as [  hspi1.Init.NSS = SPI_NSS_SOFT; ]. The codes also include LED configurations as mentioned in the README files, which indicate an error based on the LED status.I know I have an error acording to led 2 but I don't know the problem. 

LED2 toggles slowly when there is a timeout or an error in transmission/reception process.

 

 

 
 
This topic has been closed for replies.

15 replies

mƎALLEm
ST Technical Moderator
September 6, 2024

Hello,

Here you are using different MCU part numbers. Did you use the same example of STM32G432 for STM32F446RE? if yes, did you adapt the SystemClock frequency as well as the SPI bitrate?

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
nesnesAuthor
Associate III
September 6, 2024

Hello @mƎALLEm 

No I used different examples for the boards g4 master example for g4 and f4 example for f446re. Adjust the frequency and datasize acordingly at 100 Mhz(HCLK) and 8bit  

mƎALLEm
ST Technical Moderator
September 6, 2024

Need to probe MOSI and MISO lines and check what is going on.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.