85.Not all GPIO pins are created equal
Most of the IO pins in STM32 have the same structure, controlled by GPIO registers:
- direct or switched input to analog features related to the pin
- Schmitt-trigger digital input, which can be switched off if pin is set to Analog mode
- totem-pole Push-Pull output, where number of parallel-connected transistors can be chosen to select slew rate, and the upper transistors can optionally be held off for Open-Drain configuration
- individually switchable pullup and pulldown, both consisting from a true resistor, and a switching transistor
- ESD protection
- higher IO leakage of FT pins when voltage on them exceeds their respective supply voltage
- asymmetrically higher (low-level only) current on FTf pins, allowing Fm+ mode of I2C (and high-current IR LED connection)
- asymmetrically lower maximum current on pins which go through the backup-voltage switch (usually PC13-PC15, but may be others)
- surprising and quite poorly documented pullups/pulldowns on the USB-C-PowerDelivery-related pins on 'G0 and 'G4; these pins also tend to have significantly higher leakage
- significantly lower values (nominally 10kΩ) of pullups and pulldowns of PA10 and PB12 in 'F2/'F4/'F7 - related to these pins being OTG_ID pins