SPI Master and SPISlave broken

09 Dec 2014

Hello everyone,

I have been trying to get a simple SPI communication going between the STM32F401RE Nucleo (Master) and a LPC NXP1768 mbed board using the mbed API, and unfortunately I can't get it to work reliably.

The master sends and receives correct packets only some times and it is driving me crazy as I can't seem to find what is the root of this. After searching in the forum, I have discovered that others have had a similar problem and it seems that it might have something to do with the receive function in the SPISlave class.

Has anyone pinpointed the root of this behaviour?

11 Dec 2014

Hi, my problem was partly caused by the fact that the MCU's needed common ground. Even though they were connected to the same laptop with USB it still needed to use a jumper wire between ground of one board and the other.

My SPI comm now works much more reliably but still sometimes I get some wrong values.