AnsweredAssumed Answered

SPI maximum SCLK speed

Question asked by hill.jonathan on Apr 16, 2014
Latest reply on Apr 16, 2014 by Clive One
I'm currently trying to interface an STM32F4 (discovery) with a telemetry unit (RFM42B if anyones interested) using SPI.
The minimum clock time high and time low given in the telemetry devices datasheet for SPI are 40ns each, making a minimum period of 80ns, and max frequency of 12.5MHz.

So in my SPI configuration I used 

     SPI_InitStruct.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_8; // SPI frequency is APB2 frequency / 4

to get an SCLK freq of 105MHz, under the RFM's max sclk freq.
I did get this from my SCLK pin when I checked with the oscilloscope, BUT, the waveform is fairly distorted. It's distorted once it reaches the RFM's pin, but also at the pin of the discovery board too.

I tried prescaling the SCLK by another factor of two, which reduced the distortion but it still looks a bit dodgy. 

Perhaps I'm trying to use unsensible SCLK freq values, but I'm just wondering if anyone can suggest where I may otherwise be going wrong? It seems a bit odd that they'd define prescale values for SPI SCLK at which the STM32 cannot produce a good enough waveform.



Outcomes