8 years, 5 months ago.

SPI bidirectional communication: Requires reset on the slave device to communicate

Hi

I have setup two Nucleo F401RE boards to communicate with each other with one being master and other as a slave.

The slave device only communicates if it is powered after the Master board. In other terms, if slave board is powered before Master, then the slave requires a push button reset to enable communication.

Has anyone noticed this? What could be the reason behind it? Is there any solution?

Thanks a lot!

1 Answer

8 years, 5 months ago.

You probably get some spurious pulses on the SCK line and/or CS lines of the slave which causes the SPI to start a RX operation. The slave code receive statemachine may get confused and hang. Try to toggle the CS line of the master a few times to reset the SPI engine on the slave. Series resistors in the MOSI, MISO, SCK and CS lines may reduce or solve the problem.

Accepted Answer

Thanks a lot! My CS line was bit loose, which was causing this.

posted by Baljit Riar 04 Nov 2015