Skip to main content
Associate
March 6, 2025
Question

SPI Master, Slave Issue

Dear ST Team,

I am currently working with the STM32F407 board and implementing SPI communication between a Master and a slave. While the slave does respond to data sent by the Master, I am encountering an issue where the received data sometimes rolls and contains unexpected garbage values.

Could you please provide guidance on possible causes and troubleshooting steps to resolve this issue? Any insights into proper SPI configuration, clock synchronization, or handling of buffer overflows would be greatly appreciated.

Looking forward to your support.

This topic has been closed for replies.

3 replies

gbm
Super User
March 6, 2025

Search the forum for topics on SPI slave - you will find some info there.

To keep it short: it is close to impossible to implement SPI slave in a microcontroller unless the master is kind enough to implement specially relaxed timing for it.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
Associate
March 6, 2025

Any better way of handling this issue.
Because we have a STM32F407 as a SPI Slave and MCP2210 as the SPI Master

TDK
March 6, 2025

Looks like you can set the delay after chip select. Set it high enough that your code can keep up.

TDK_0-1741270715734.png

 

"If you feel a post has answered your question, please click ""Accept as Solution""."