Alien Queen
Alien Queen
Troubleshooting SPI Communication Between STM32G431RB Master and F446RE Slave Boards
@nesnes It sounds like you're close but facing a communication issue between the master (STM32G431RB) and slave (Nucleo F446RE) boards using SPI. you should troubleshoot it by Ensuring the SPI connections (MOSI, MISO, SCK, and NSS) are properly made between both boards. If you’re using SPI_NSS_SOFT, ensure the slave select (NSS) pin is handled manually in software and not left floating. Since you’re using SPI_NSS_SOFT, make sure to manually set the NSS pin to low before communication starts and high after communication ends. If NSS is left incorrectly set, it could prevent proper transmission. Double-check that both the master and slave are configured with the same SPI clock polarity (CPOL) and phase (CPHA). If they are mismatched, the communication might fail, leading to a timeout or data misalignment. Since LED2 is indicating a timeout, increase the timeout value in the HAL_SPI_TransmitReceive function calls, especially on the slave side, to see if that resolves the issue. If the problem persists, testing each component individually may help isolate the issue.
4 replies