Four output modes of STM32

Publisher:SereneJourneyLatest 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:Four output modes of STM32

Previous article:STM32/ARM Cortex-M3 reset sequence
Next article:STM32F10xxx supports three reset

Recommended ReadingLatest update time:2024-11-16 15:33

HardFault_Handler Problem Finding Method
There are two main reasons why HardFault_Handler failure occurs in STM32: 1. Memory overflow or out-of-bounds access. This requires standardizing the code when writing the program yourself, and you need to slowly troubleshoot when you encounter it. 2. Stack overflow. Increase the size of the stack.   How to trou
[Microcontroller]
HardFault_Handler Problem Finding Method
Simple use and precautions of Stm32 platform UCOSII
1. Several concepts related to UCOSII: task priority, task stack, task control block, task ready list and task scheduler       Task priority is a concept that is easy to understand. In UCOS, each task has a unique priority. The unique identifier of a task. In UCOSII, when using the CPU, tasks with higher priorities
[Microcontroller]
Simple use and precautions of Stm32 platform UCOSII
STM32 fast read and write AT24C16 code simulation I2C
This post is only applicable to chips AT24C16 and below. The reading and writing methods of chips AT24C32 and above are different, so it is not applicable!!! If your code can read and write 24C01/02 normally, you can use it to read 24C16 directly, but it can only read 256 bytes. AT24C16 is different from AT24C01/0
[Microcontroller]
STM32 fast read and write AT24C16 code simulation I2C
STM32 Series 31 - MPU6050 Six-Axis Sensor
Introduction: MPU6050 is the world's first integrated 6-axis motion processing component launched by InvenSense. It has a built-in 3-axis gyroscope and 3-axis acceleration sensor, and contains a second IIC interface for connecting an external magnetic sensor. Using its own digital motion processor (DMP: Digital Motion
[Microcontroller]
STM32 timer timing calculation formula
Tout = ((arr+1)*(psc+1))/Tclk; in: Tclk: Timer input clock frequency (unit: MHZ) Tout: Timer overflow time (unit: us)   .TIM_Period = arr; eg; 4999   .TIM_Prescaler = psc; eg: 7199   Tout = ((4999+1) × (7199+1))/72 = 500000us = 500ms.
[Microcontroller]
2021 STM32 China Summit held in Shenzhen, ST and partners showcase innovative achievements
2021 STM32 China Summit held in Shenzhen, STMicroelectronics and partners showcase innovations • With the theme of "Core" Ecosystem, "Assist" Security, and "Connect" the Future, the 2021 STM32 Summit focuses on industry and security, artificial intelligence and sensor technology, cloud access and connectivity, ecolo
[Microcontroller]
How to find the cause of hardfault in STM32
There are two main reasons why HardFault_Handler failure occurs in STM32: 1. Memory overflow or out-of-bounds access. This requires standardizing the code when writing the program yourself, and you need to slowly troubleshoot when you encounter it. 2. Stack overflow. Increase the size of the stack.   How to troubl
[Microcontroller]
How to find the cause of hardfault in STM32
Design of STM32 motion control card based on PCI bus
    With the popularization of computers, the performance, reliability and application environment of PCs have changed dramatically. In the industrial field, PCs have a large number of supporting software to improve user interfaces, graphic display, dynamic simulation, fault diagnosis, network communication and many ot
[Microcontroller]
Design of STM32 motion control card based on PCI bus
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号