Skip to main content
Explorer
September 6, 2024
Question

SPI Between two nucleo boards mcu

  • September 6, 2024
  • 1 reply
  • 7860 views

 

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.

    1 reply

    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?

    nesnesAuthor
    Explorer
    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  

    Technical Moderator
    September 6, 2024

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