2026-03-04 12:05 AM
Hello everyone,
I am currently working on a project using the STM32F030C, and I have a question regarding the GPIO speed configuration (slew rate) for SPI pins.
Here is my setup:
MCU: STM32F030C
Interface: SPI (configured as Slave)
SPI Clock Frequency: 13.5 MHz
To keep EMI (Electromagnetic Interference) emissions as low as possible, I was considering setting the GPIO output speed for the SPI pins (specifically MISO, since the MCU is the slave) to GPIO_Speed_Level_Low.
However, according to the datasheet (see attached screenshot), the "Low" speed setting is specified for a maximum frequency of 2 MHz.
My questions are:
Is it practically possible to run a 13.5 MHz SPI signal with the GPIO speed set to Low, despite the datasheet specs?
Does this pose a high risk of corrupted/poor communication due to the slew rate being too slow (e.g., degraded signal integrity, failing to meet setup/hold times for the master)?
Has anyone here tried this approach to reduce EMI at similar frequencies, or is it strictly recommended to bump the GPIO speed to Medium/High for 13.5 MHz?
Any insights or shared experiences would be highly appreciated.
Thanks in advance!
2026-03-04 3:02 AM
> Does this pose a high risk of corrupted/poor communication due to the slew rate being too slow (e.g., degraded signal integrity, failing to meet setup/hold times for the master)?
Yes.
Note, that attempting to do this *may* appear to work; however, the pin's slew rate changes with temperature (and VDD) and also with process variation (i.e. every piece is slightly different) and the datasheet values are guaranteed worst case.
JW
2026-03-04 3:36 AM
@MERSI wrote:
Is it practically possible to run a 13.5 MHz SPI signal with the GPIO speed set to Low, despite the datasheet specs?
Think about the numbers:
13.5 MHz has a period of 77ns: that's not going to work with 125ns rise and fall times - is it?
You could easily try it, and observe with an oscilloscope what you get ...
But note @waclawek.jan's warning about test conditions and process variations.
In general, you should always do what the datasheet tells you - those are the guaranteed performance conditions.
@MERSI wrote:the "Low" speed setting is specified for a maximum frequency of 2 MHz.
and you want to go at over six times that speed ?!