cancel
Showing results for 
Search instead for 
Did you mean: 

UARTs GPIO speed can be low?

Pavel A.
Evangelist III

Noticed that new Cube versions and CubeIDE, generate initialization code for UARTs TX and RX pins with GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW

Previous Cube versions (at least 4.x) generate instead GPIO_SPEED_FREQ_VERY_HIGH.

Was this change intentional?

GPIO_SPEED_FREQ_LOW seems to work on H7 at least at 115200. But can it make trouble at higher speeds?

-- pa

1 ACCEPTED SOLUTION

Accepted Solutions
Piranha
Chief II

The datasheet has a table named "I/O AC characteristics" or similar, where you can find maximum frequencies for speed modes at different bus capacitances and supply voltages. I've always used only low speed mode for USART on F1, F7, L4 even connecting boards on table with wires. At least up to 921600 baudrate haven't had any problems. 🙂

View solution in original post

2 REPLIES 2

The ultimate answer is of course in the datasheet. The generated code may be a hint, but it's your responsibility at the end of the day.

Generally, you should strive for the slowest edges possible, for all imaginable reasons.

UART generally is pretty insensitive to slew rates, especially if they are up/down symmetrical. And, normally, it's slow.

JW

Piranha
Chief II

The datasheet has a table named "I/O AC characteristics" or similar, where you can find maximum frequencies for speed modes at different bus capacitances and supply voltages. I've always used only low speed mode for USART on F1, F7, L4 even connecting boards on table with wires. At least up to 921600 baudrate haven't had any problems. 🙂