STM32 gotchas
85.Not all GPIO pins are created equal

Most of the IO pins in STM32 have the same structure, controlled by GPIO registers:

For most pins, the characteristics are roughly the same: the Schmitt trigger has a leakage of max. 1uA; the output stage can source cca 8mA (or 20mA with degraded output voltages) at high enough OSPEEDR setting, driving a few MHz signals at lowest OSPEEDR setting and frequencies up to the maximum system clock at higher OSPEEDR setting; and the nominal value of pullup and pulldown resistors is cca 40kΩ.

However, exceptions exist, sometimes leading to nasty surprises in a late stage of design, after boards have been designed and populated, and just some pin does not behave as expected.

There are obvious differences in the ESD protection between 3V-only pins (generally marked as TTx in the pinout table in datasheet) and 5V-tolerant (FTx) pins; with the caveat of some FT pins turning non-5V-tolerant, as soon as they are switched to Analog mode (e.g. PA4/PA5 in 'F4, when they are switched to be DMA outputs).

Among the less obvious and thus potentially more surprising exceptions are:

Generally, when designing a new circuit, it pays out to read the datasheet to given STM32 carefully, including the GPIO characterization data, even if it is undoubtedly a boring reading.