当前位置:网站首页>STM32 series - serial port UART software pin internal pull-up or external resistance pull-up - cause problem search
STM32 series - serial port UART software pin internal pull-up or external resistance pull-up - cause problem search
2022-07-05 01:41:00 【Curious chinchilla】
# STM32 series - A serial port -uart- Pin pull-up - Search for cause problems
Preface -( Know that a conclusion is correct , Also know why it is right )
lately , In the debug uart Serial port , Be asked to , When initializing the serial port , Set the pin to pull up . From this, I thought of the question of why to pull up , But I checked the information on the Internet , Most of the findings are about RX It should be pulled up , But why pull up , No one said it clearly , So I want to find out the reason .
Problem description
Presuppose questions , Know what you want to ask , The problem itself . If your head is in a mess , Don't be ambivalent , That is not accurate for the knowledge we have .
- RX yes It should be pulled up inside the software , Or add external resistance to pull up ?
- TX whether Also needed Software internal pull-up , perhaps External resistance pull-up is required ?
- If you add an external pull-up resistance, what is it generally ?
Lookup process
(1) Search the Internet
1、 stay CSDN Find several articles , It involves the problem of pull-up resistance , The one with a better description is put below .
This blog has collected a lot of discussions , It has reference value .
link :https://blog.csdn.net/sinat_16643223/article/details/119208104
2、 I also searched some on the Internet , It also has reference value , I put the translated screenshot directly below . Network restrictions , May not be able to access .
https://electronics.stackexchange.com/questions/270834/pull-up-resistors-on-uart


(2) Ask the boss
I consulted a professional boss , According to the understanding of the words of the boss , The following three points are summarized , Or you need to verify the content .
- You need to check the internal block diagram of the chip
- Whether there is pull-up on the peripheral
- Tx Never mind , Push pull .
- Find the sample code , See what people do
(3) Check code - Find manual - verification
(1) Find the sample code , have a look ST Whether to pull up all in the sample code .
I used to debug code before STM32cubeIDE, This software has a sample library , If they are installed by default , You will find the sample code path under the following path .
Specifically, select any file 
stay HAL Library code file stm32f4xx_hal_msp.c Next , It has the following contents , That is to say ST Official examples , There is no forced pull up , But I have no corresponding board , So I don't know how to connect peripherals , And whether there is a pull-up resistor .
(2) Find the sample code , See if the punctual atomic code has a pull-up resistor .
Find the punctual atom HAL Library code , See the following in the code .
The punctual atomic code is indeed pulled up , Then look at F4 Is there a pull-up resistor on the board , Schematic diagram is as follows , You can see that there is no external pull-up resistor .
This external device CH340G Also check the manual , Find English datasheet Not to mention , But the manual translated from Chinese has instructions , The manual links are as follows .
https://download.csdn.net/download/qq_22146161/80134371
There is such a sentence in the Chinese manual , It is understandable that there is a pull-up resistor inside this chip .
(3) During the search , Find out whether you need to add pull , It has something to do with the working mode of the chip , It has something to do with the chip itself . Checking F4 The following is found in the Chinese reference manual “STM32F4xx Chinese Reference Manual .pdf”.
Some resources links
(1)CSDN link :
https://blog.csdn.net/weixin_46146288/article/details/112681794
(2)CSDN link :
https://blog.csdn.net/weixin_49770585/article/details/115460495
(3) lookup STM32 Specific model of series STM32F103 The internal weak pull-up resistance is generally 40K
https://www.pianshen.com/article/8441785505/
perhaps
https://blog.csdn.net/wuhuijun165/article/details/49518575
Summary of existing conclusions
Summarize according to the problems and the information you find , Sum up the following points , For reference , If you have new knowledge , Please leave a message to correct , I'll change it in time .
- RX yes It should be pulled up inside the software , Or add external resistance to pull up ?
This needs to be based on the actual situation of the chip , Check the chip IO Hardware block diagram determine , Now most chips are inside , A weak pull-up resistor has been automatically integrated , Generally, external resistance pull-up is not required , You only need to configure the software , With pull-up . - TX whether Also needed Software internal pull-up , perhaps External resistance pull-up is required ?
This also depends on the actual situation of the chip , In general , There is no need for internal software pull-up and External resistance pull up , stay GPIO Working in push-pull mode , In fact, we already have this resistor . - If you add an external pull-up resistance, what is it generally ?
According to the available information , Most of the external pull-up resistors are 10K, In fact, if you are not sure whether your chip has weak pull-up or pull-down inside the chip , You can do it in advance PCB Leave two packages when drawing , Don't weld at that time .
边栏推荐
- Classification of performance tests (learning summary)
- Outlook: always prompt for user password
- Yyds dry inventory jetpack hit dependency injection framework Getting Started Guide
- node工程中package.json文件作用是什么?里面的^尖括号和~波浪号是什么意思?
- Wechat applet: new independent backstage Yuelao office one yuan dating blind box
- 85.4% mIOU! NVIDIA: using multi-scale attention for semantic segmentation, the code is open source!
- Pytorch common code snippet collection
- Numpy library introductory tutorial: basic knowledge summary
- Valentine's Day flirting with girls to force a small way, one can learn
- Yyds dry goods inventory [Gan Di's one week summary: the most complete and detailed in the whole network]; detailed explanation of MySQL index data structure and index optimization; remember collectio
猜你喜欢

DOM basic syntax

微信小程序:星宿UI V1.5 wordpress系统资讯资源博客下载小程序微信QQ双端源码支持wordpress二级分类 加载动画优化

ROS command line tool

Wechat applet: new independent backstage Yuelao office one yuan dating blind box

JS implementation determines whether the point is within the polygon range

Application and Optimization Practice of redis in vivo push platform

Exploration and practice of integration of streaming and wholesale in jd.com

Great God developed the new H5 version of arXiv, saying goodbye to formula typography errors in one step, and mobile phones can also easily read literature

MATLB | multi micro grid and distributed energy trading

Kibana installation and configuration
随机推荐
Basic operations of database and table ----- delete index
Delaying wages to force people to leave, and the layoffs of small Internet companies are a little too much!
Great God developed the new H5 version of arXiv, saying goodbye to formula typography errors in one step, and mobile phones can also easily read literature
Yyds dry inventory jetpack hit dependency injection framework Getting Started Guide
微信小程序:全网独家小程序版本独立微信社群人脉
R语言用logistic逻辑回归和AFRIMA、ARIMA时间序列模型预测世界人口
C语音常用的位运算技巧
Wechat applet; Gibberish generator
JS implementation determines whether the point is within the polygon range
Yyds dry goods inventory [Gan Di's one week summary: the most complete and detailed in the whole network]; detailed explanation of MySQL index data structure and index optimization; remember collectio
ROS command line tool
Wechat applet: new independent backstage Yuelao office one yuan dating blind box
Win: use PowerShell to check the strength of wireless signal
What is the length of SHA512 hash string- What is the length of a hashed string with SHA512?
When the industrial Internet era is truly developed and improved, it will witness the birth of giants in every scene
Global and Chinese market of portable CNC cutting machines 2022-2028: Research Report on technology, participants, trends, market size and share
增量备份 ?db full
What is the current situation and Prospect of the software testing industry in 2022?
Armv8-a programming guide MMU (3)
batchnorm.py这个文件单GPU运行报错解决