当前位置:网站首页>STM32 serial communication related learning
STM32 serial communication related learning
2022-07-19 06:45:00 【Salmon with lemon】
List of articles
Preface
Serial communication is a very common way of serial communication between devices , It is simple and convenient , Have a broad audience
One 、 The difference between register and firmware library based programming
Compared with the way of Library Development , If we directly configure registers , The amount of code generated in this way is a little less , But we use stm32, This is different , because stm32 Our resources are sufficient , So we can and are willing to sacrifice CPU Resources are put into storage for development . And we also found that the writing method of firmware library is simpler , It's easy for newcomers like me to understand , There are more information about this on the Internet .
Two 、STM32 Of USART Window communication
1. Get ready
Just like the previous experiment , We used the following tools and equipment :
High speed Simulator
Wildfire guider STM32F103VET6 High speed version
keil5
Serial debugging assistant Fire Tools(v1.0.1.5)
USBQ drive CH340( Only the serial port of the development board has a driver , The simulator does not need to install drivers )
2. experiment
As before , Connect the equipment , After confirming that the equipment is correct , Turn on the switch .
Still pay attention to the links in the serial port ! Or there will be a big problem :
install USB Serial port drive CH340( Find relevant information in the development board store you bought )
Install the serial port multifunctional debugging assistant Fire Tools
This is the debugging assistant that matches my development board 
Just click 
Set the baud rate for serial port debugging to 115200,1 Bit stop bit , No parity bit
Then we open the corresponding project , Here's the picture

This is the project included in the learning materials , Now let's make some changes 

The above figure is modified main.c and stm32f10x_it.c
Now compile , No problem 
Click the magic wand to configure 


I studied it , Find out SWJ In fact, both options are ok , Because it is a high-speed simulator , Configuration complete . Now debug and burn .

Burn successfully ! Now let's look at the results .
complete
3、 ... and .C Global variables in language programs 、 local variable 、 Pile up 、 Stack
We can use memory as 4 Zones : Stack 、 Pile up 、 overall situation ( static state ) Storage area and constant storage area
1. Stack 、 Pile up 、 overall situation ( static state ) Storage area and constant storage area
( One ) Stack
Stack (stack) Also known as the stack , It's an operationally constrained linear table . A linear table limited to insert and delete operations only at the end of the table . This end is called the top of the stack , relatively , Call the other end the bottom of the stack . Inserting a new element into a stack is also called a push 、 Push or push , It's putting a new element on top of the top of the stack , Make it the new top element ; Removing an element from a stack is also called making a stack or backing a stack , It removes the top element of the stack , Make its adjacent elements the new top of the stack .
( Two ) Pile up
Pile up (Heap) Is a general term for a special class of data structures in computer science . A heap is usually an array object that can be seen as a complete binary tree .
( 3、 ... and ) overall situation / Static storage area
It can be understood that global variables and static variables are allocated to the same block of memory
( Four ) Constant store
and “ overall situation / Static storage area ” almost , Just store constants
2.ubuntu Programming in the system
establish .c file , And use gcc perform , result 
3.keil verification

边栏推荐
- Part of the second Shanxi Network Security Skills Competition (Enterprise Group) WP (II)
- Set the index library structure, add suggestions that can be automatically completed to users, and turn some fields into collections and put them into suggestions
- No application for domain name SSL certificate under ports 80 and 443 (applicable to acme.sh and certbot)
- 实验五: GUI
- Share the application cases of CS brand patch T card in the field of hunting camera
- Spot detection record
- sql的约束条件
- Robot stitching gesture recognition and classification
- Performance comparison between merge into and update in Oracle
- DSL implements bucket aggregation
猜你喜欢

深度优先遍历(Depth First Search, 简称 DFS)

Pytorch deep learning practice-b station Liu erden-day4

Solution: unable to load file c:\program files\ Because running scripts is forbidden on this system

Es aggregation analysis reports an error: "reason": "text fields are not optimized for operations

Antd is not defined

Pytorch deep learning practice-b station Liu erden-day6

基于Ardunio IDE软件开发编程学习

Restapi implements aggregation (dark horse tutorial)

Pytorch deep learning practice-b station Liu erden-day3

Spot detection record
随机推荐
政府采购如何用好成本补偿合同
STM32的PWM和DAC练习中生成音频和波形
How can the new generation of CS sdnand (also known as patch T card) make the old MCU youthful
Pytorch deep learning practice-b station Liu erden-day7
Information on successful cooperation between CS brand sdnand and stm32mcu
Vcenter6.7安装及排错
实验二 类与对象定义初始化
Color histogram grayscale image & color image
Vscode Tips 1
Operation of documents in index library
Face recognition error
感知智能手機上用戶的關注狀態
[antdv: Each record in table should have a unique `key` prop,or set `rowKey` to an unique.....
網絡中的一些基本概念
Part of the second Shanxi Network Security Skills Competition (Enterprise Group) WP (I)
Get the first and last values after Oracle grouping and sorting
Pytorch deep learning practice-b station Liu erden-day5
吴恩达机器学习第6-7章
Restclient multi conditional aggregation
Mapping index attribute & operation of creating index