cancel
Showing results for 
Search instead for 
Did you mean: 

performance of GPIO signal for SPI seems slow on STM32F427

Rhodes.Keith
Associate II
Posted on March 16, 2015 at 16:53

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?

Thanks...Keith Rhodes

#stm32f4-spi-gpio-speed
5 REPLIES 5
Posted on March 16, 2015 at 17:03

Is there something I should be doing differently?

The 10X scope probe?
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
AvaTar
Lead
Posted on March 16, 2015 at 17:11

Is there something I should be doing differently?

 

Perhaps the PCB layout ?

Signal propagation is not only a matter of your source (SPI pins), but also of the complex impedance your wiring represents. Perhaps the PCB tracks (or wires) too long, and don't match source/sink impedance ?

PCB layout for HF signals is not a trivial matter.

There are a lot of open designs available you can use as reference, such as ST's Discovery boards - at least in regard to PCB routing.

Edit: And yes, clive is correct. A scope probe already represents a high capacitive load, a could impair the signal significantly.

mandrake
Senior
Posted on March 17, 2015 at 14:44

What is the bandwidth of your oscilloscope?

Rhodes.Keith
Associate II
Posted on March 17, 2015 at 21:54

We're using a very fast scope with 10x probes.

The traces on the board are about 1'' with no additional capacitance on the line.

The problem is that when we set it to 16MHz, the signal doesn't get close to 3 volts and the rise time is about 60nS.

Rhodes.Keith
Associate II
Posted on March 18, 2015 at 14:03

I had to check with our hardware engineer. The scope is a 200MHz tektronix scope and the probes are 10X also from tektronix. This should be good enough to measure a 16MHz signal.