SPI signal distorted at high speed
Two STM32H743 series MCUs are on a single board and they communicate using SPI. When SPI clock frequency is more than 1.5 Mhz, SPI communication is not working properly. The distorted clock signal waveforms at high frequencies are attached below.
A 51E series resistor is connected on all 4 signals.
The trace length is almost 35mm

I tried reducing the series resistors from 51E to 33E and 20E. No much difference was observed in the waveforms. What can be done?
1. CLK freq = 1.5MHz
2. CLK freq = 3.125MHz
3. CLK freq = 6.25MHz
4. CLK freq = 12MHz
