STM32's 4 output modes

Publisher:快乐阳光Latest update time:2017-10-01 Source: eefocusKeywords:STM32 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Normal push-pull output (GPIO_Mode_Out_PP):

 

Application: Generally used in 0V and 3.3V applications. The circuit passes through two P_MOS and N_MOS tubes, which are responsible for pulling up and pulling down current.

 

Usage: Direct use

 

Output level: The low level of push-pull output is 0V and the high level is 3.3V.

 

2. Normal open-drain output (GPIO_Mode_Out_OD):

 

Application occasions: Generally used in situations where the levels do not match, such as when a high level of 5V needs to be output.

 

How to use: You need to connect an external pull-up resistor, the power supply is 5V, set the GPIO to open-drain mode, and when the output is high, the pull-up resistor and the power supply output a 5V voltage.

 

Output level: In open-drain output mode, if the output is 0, low level, the N_MOS is turned on and the output is grounded. If the control output is 1 (cannot directly output high level), neither high level nor low level is output, which is a high configuration. For normal use, a pull-up resistor must be connected externally.

 

Features: It has a "wired-and" feature, that is, when many open-drain mode pins are connected together, the pull-up resistor provides a high level only when all pins output a high impedance state. The voltage of this high level is the voltage of the power supply connected to the external pull-up resistor. If one of the pins is at a low level, the line is equivalent to a short circuit to ground, making the entire line at a low level, 0 volts.

 

3. Multiplexed push-pull output (GPIO_Mode_AF_PP): used as serial port output.

 

4. Multiplexed open-drain output (GPIO_Mode_AF_OD): used in IIC.

 

All open-drain outputs require a pull-up resistor.


Keywords:STM32 Reference address:STM32's 4 output modes

Previous article:What does the STM32 series suffix mean?
Next article:Calculation and setting of STM32 PWM waveform

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号