当前位置:网站首页>Working principle of stm32gpio port
Working principle of stm32gpio port
2022-07-08 01:32:00 【Yiao】
stm32f4 Yes 7 Group IO mouth , Each group has 16 individual IO mouth ,GPIO The pin of is connected to the external device , It can realize communication with the outside , Control external hardware , The function of collecting external hardware data , The corresponding common applications are serial port , The motor ,ADC collection .
GPIO Basic structure of port
Every GPIO There is such a circuit diagram inside the port

GPIO There are four input modes ( Floating input , Pull up input , Drop down input , Analog input ), Four output modes ( Open drain output , Open drain multiplexed output , Push pull output , Push pull multiplex output ).
Besides ,GPIO In output mode, three flipping speeds are supported 2MHz,10MHz,50MHz, Without requiring fast conversion , Generally, low speed , The purpose is to save power . But in the communication protocol, we usually use 50MHz,

GPIO_Mode_AIN Analog input
GPIO_Mode_IN_FLOATING Floating input
GPIO_Mode_IPD Drop down input
GPIO_Mode_IPU Pull up input
GPIO_Mode_Out_OD Open drain output
GPIO_Mode_Out_PP Push pull output
GPIO_Mode_AF_OD Reuse open drain output
GPIO_Mode_AF_PP Multiplexing push pull output
Floating input

Floating input mode , The external level is directly input into the data register , in other words ,IO How much level does the port input ,CPU How many levels will be read , The pin is suspended , Without signal input , The level of the read port is uncertain .
Pull up input

In pull-up input mode ,IO The data signal of the port directly enters the data register , But without input , The input level remains high .
Drop down mode

Pull down input mode ,IO The data signal of the port directly enters the data register , But without input , The input level remains low .
Analog input 
In analog mode ,IO Analog signal of port ( Voltage signal ) Direct analog input to on-chip peripheral modules .
How to choose IO Mouth mode
Floating input _IN_FLOATING —— Floating input , You can do it KEY distinguish ,RX1
With pull-up input _IPU——IO Internal pull-up resistor input
With drop-down input _IPD—— IO Internal pull-down resistor input
Analog input _AIN —— application ADC Analog input , Or low power consumption
Open drain output _OUT_OD ——IO Output 0 Pick up GND,IO Output 1, In the air , It needs to be connected with pull resistance , In order to achieve high output level . When output is 1 when ,IO The state of the port is raised by the pull-up resistor , But because of the open drain output mode , such IO The port can also be changed from an external circuit to a low level or constant . You can read IO Input level changes , Realization C51 Of IO Two way function
Push pull output _OUT_PP ——IO Output 0- Pick up GND, IO Output 1 - Pick up VCC, Read input value is unknown
Push pull output of multiplexing function _AF_PP —— Internal and external functions (I2C Of SCL、SDA)
Open drain output of multiplexing function _AF_OD—— Internal and external functions (TX1、MOSI、MISO.SCK.SS)
边栏推荐
- Getting started STM32 -- how to learn stm32
- 2、TD+Learning
- 2022 examination for safety production management personnel of hazardous chemical production units and new version of examination questions for safety production management personnel of hazardous chem
- Chapter XI feature selection
- 2022 R1 fast opening pressure vessel operation test question bank and R1 fast opening pressure vessel operation free test questions
- LeetCode 练习——剑指 Offer 36. 二叉搜索树与双向链表
- The combination of relay and led small night light realizes the control of small night light cycle on and off
- Scalar / vector / matrix derivation method
- The communication clock (electronic time-frequency or electronic time-frequency auxiliary device) writes something casually
- The examination contents of the third batch of Guangdong Provincial Safety Officer a certificate (main person in charge) in 2021 and the free examination questions of the third batch of Guangdong Prov
猜你喜欢

The beauty of Mathematics -- the principle of fine Fourier transform

qt-使用自带的应用框架建立--hello world--使用min GW 32bit

Gnuradio transmits video and displays it in real time using VLC

5、離散控制與連續控制

Chapter 5 neural network

qt--將程序打包--不要安裝qt-可以直接運行

4. Strategic Learning

Ag9311maq design 100W USB type C docking station data | ag9311maq is used for 100W USB type C to HDMI with PD fast charging +u3+sd/cf docking station scheme description

Guojingxin center "APEC investment +": some things about the Internet sector today | observation on stabilizing strategic industrial funds

写一个纯手写的qt的hello world
随机推荐
Running OFDM in gnuradio_ RX error: gr:: Log: info: packet_ headerparser_ b0 - Detected an invalid packet at item ××
4. Strategic Learning
2022 safety officer-c certificate examination summary and safety officer-c certificate reexamination examination
Euler Lagrange equation
5. Discrete control and continuous control
解决报错:npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
Matlab code about cosine similarity
Kaptcha generates verification code on Web page
After modifying the background of jupyter notebook and adding jupyterthemes, enter 'JT -l' and the error 'JT' is not an internal or external command, nor a runnable program
Micro rabbit gets a field of API interface JSON
Leetcode notes No.21
COMSOL - Construction of micro resistance beam model - final temperature distribution and deformation - establishment of geometric model
Ag9310 for type-C docking station scheme circuit design method | ag9310 for type-C audio and video converter scheme circuit design reference
Introduction to the types and repair methods of chip Eco
4、策略学习
About snake equation (5)
AttributeError: ‘str‘ object has no attribute ‘strftime‘
Scalar / vector / matrix derivation method
Write a pure handwritten QT Hello World
EDP to LVDS conversion design circuit | EDP to LVDS adapter board circuit | capstone/cs5211 chip circuit schematic reference