8 modes of GPIO port configuration

Table of contents

 8 modes​

 Floating/Pull-up/Pull-down input​

Analog input

 Open drain/push-pull output

 Multiplexed open-drain push-pull output


GPIO I/O port bit basic structure 

 8 modes

 Floating/pull-up/pull-down input

Analog input

 Configure the pin as an analog input when using the ADC

 Open drain/push-pull output

Generally used ascommunication protocoldriver

Open-drain output PMOS is invalid, NMOS is valid, high level has no driving ability, low level has driving ability

Push-pull output PMOS and NMOS are both valid. The high level is connected to VCC and the low level is connected to VSS.

 Multiplexed open-drain push-pull output

Controlled by on-chip peripherals

 You can check what mode is configured through the manual

Guess you like

Origin blog.csdn.net/m0_70732442/article/details/130930271