Professional Documents
Culture Documents
2.2.2. Push-pull
When the pin output logic one, the transistor connected to the power supply is turned on,
the other transistor is turned off. It provides an electric current to the external circuit
connected to the output pin,
When logic zero is outputted, the transistor connected to the ground is turned on
2.2.3. Open drain
When the pin is configured as output, the value written to the output data register
(GPIOx_ODR) is output on the I/O pin. It is possible to use the output driver in push-pull
mode or open drain (only the N-MOS is actived when 0 is output).
2.2.4. Input mode
o Pull-up
o Pull-down
o Flotting
8. Output configuration
When the I/O is programmed as output
o The output buffer is enabled
Open drain mode : A « 0 » in the output register activates the N-MOS
whereas a « 1 » in the output register leaves the port in Hi-Z (the P-MOS is
never activated)
Push pull mode : A « 0 » in the output register activated the N-MOS whereas
a « 1 » in the output register activates P-MOS
o The Shimitt triger input is actived
o The weak up pull-up and pull-down resistors are activated or not depending on the
value in the GPIOx_PUPRD register
o The data present on the I/O pin are sampled (echantionnée) into the input data
register even AHB1 cycle clock
o A read access to the input data register gets the I/O state
o A read access to the output data register gets the last written value
9. Alternate function configuration
When the I/O port is programmed as alternate function
o The output buffer can be configured as open-drain or push-pull
o The output buffer is driven by the signal coming from the peripheral (transmitter
enable and data)
o The schmitt trigger input is activated
o The weak up pull-up and pull-down resistors are activated or not depending on the
value in the GPIOx_PUPRD register
o The data present on the I/O pin are sampled (echantionnée) into the input data
register even AHB1 cycle clock
o A read access to the input data register gets the I/O state
10. Analog configuration
When the I/O port is programmed as analog
o The output buffer is disabled
o The Schmitt trigger input is desactivated, providing zero consumption for every analog
value of the I/O pin. The output of Schmitt trigger is forced to constant value (0)
o The weak pull-up and pull-down resistors are disabled
o Read access to the input data register gets the value « 0 »