2023-06-26 03:31 AM
I use spi1 as the slave to receive data, and if the speed of the spi master is set above 11M, the data received will be misaligned.I would like to know what is the maximum speed supported by the SPI peripheral on the stm32h503rbt6u chip in the slave mode?
Solved! Go to Solution.
2023-06-26 05:35 AM
How does the physical connection look like? Can you show photos?
What are the logic levels at both sides?
Is NSS low all the time during transmission?
JW
2023-06-26 03:37 AM - edited 2023-06-26 03:41 AM
And what exactly do you mean by "misaligned"?
My wild guess is: if by "misaligned" you mean missing/extra frames then it has nothing to do with hardware but rather depends on software - the software reaction time. It's generally hard to implement an intelligent (responding to commands) SPI slave with a microcontroller.
If it's a hardware thing and you see bits being "midaligned" then check the speed setting of all SPI lines on both sides. In particular check if master NSS output (usually software-controlled GPIO) is set to maximum speed.
2023-06-26 04:55 AM
As shown in the above figure, when the speed set by the spi master exceeds 11M, the data sent by the slave appears to have lost bits
2023-06-26 05:18 AM
from ds :
so 120MHz max. ; how long are the wires ? ground /shield ? damping resistors ?
2023-06-26 05:30 AM
May I ask which document should I refer to for this image? I am using a DuPont cable, and the master and slave devices use the same ground
2023-06-26 05:35 AM
How does the physical connection look like? Can you show photos?
What are the logic levels at both sides?
Is NSS low all the time during transmission?
JW
2023-06-26 05:47 AM
The physical connection is shown in the figure above.
The logic level is all 3.3v.
NSS has always been low, but it is not used in firmware
2023-06-26 05:59 AM
cpu data...
2023-06-26 06:18 AM
Read the article I linked to.
12MHz is not a trivial frequency.
JW
2023-06-26 06:46 AM
Thank you very much for your patient response