I have programmed a set of GPIOs to be SPI. When I program the SPI clock to be anything faster than 4MHz, the rise times of the clock, MISO and MOSI signals is unacceptable (the clock signal is very rounded and not close to a clean square wave).
The device I'm talking to (Serial Flash) can handle up to 50MHz clock speeds and it would be great to get better speeds, but the signal integrity is not good enough.
I have tried setting the GPIO speed to FAST and HIGH, but the signal quality doesn't improve.
I'm using SPI1, with GPIO A5 as the clock, A6 as MISO and B5 as MOSI.
Is there something I should be doing differently?