Skip to main content
Pavel A.
Super User
November 21, 2019
Solved

UARTs GPIO speed can be low?

  • November 21, 2019
  • 2 replies
  • 1300 views

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

This topic has been closed for replies.
Best answer by Piranha

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. :)

2 replies

waclawek.jan
Super User
November 21, 2019

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
PiranhaBest answer
Principal III
November 21, 2019

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. :)