cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with SPI Master / Slave Communication

GS1
Senior III

We have a new board with seven STM32H743 onboard. One is used as SPI-master, the other 6 are SPI-slaves.

Clock speed is set to 25MHz. When communicating to the slaves, 3 of them return wrong data after a few seconds.

The initialisation code for the Slaves is the same Source code. Is was created by SMT32CubeMX V5.0.

SPI is set to 8Bit data, CPOL High, 2nd Edge, Pin speed is set to very high.

The SPI configuration is as follows:

Slaves are connected to SPI1, SPI2, SPI 4, SPI5 and SPI6 of the master unit. SPI6 is routed to 2 processors and will be selected using the CE pin.

We are wondering what could cause the failure of the 3 slaves which are connected to SPI4, SPI5 and one of the connection to SPI6.

Any help is very much appreciated!

4 REPLIES 4

> Pin speed is set to very high.

Try somewhat lower.

JW

AvaTar
Lead

If you are somewhat experienced with RF, you can check the SPI waveform with a scope.

A 25MHz clock requires matching line impedances.

Thank you very much for your post!

As it currently seems, it is working fine for all 6 slaves now at 25 MHz with speed set to "high" instead of "very high".

We also did set pullup/down resitors to MISO, MOSI and Clock. Clock is set to Pullup, MISO/MOSI are set to Pulldown.

This seems to be the best working setup.

Maybe this iadditional nformation helps somebody else.

S.Ma
Principal

always use an oscilloscope to look at the signal quality. The lowest speed that works will gives you lowest EMI.