S5PV210 serial communication interface_1

Publisher:乐基儿vosLatest update time:2022-08-04 Source: csdnKeywords:S5PV210 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Name of the serial port:

(1) In the S5PV210 data sheet, the serial port controller is in section 8.1

(2) The official name of the serial port is: universal asynchronous receiver and transmitter, abbreviated as UART in English and serial port in Chinese.


2. Block diagram of the working principle of the serial port controller of S5PV210:

(1) The entire serial port controller consists of two parts: a transmitter and a receiver. The functions of the two parts are independent of each other. The transmitter is responsible for sending information to the outside, and the receiver is responsible for receiving information from the outside to the inside.

(2) From the bus perspective, the serial port controller is connected to the APB bus. The impact on our programming is that in the future, when calculating the source clock of the serial port controller, the APB bus will be used for calculation.

(3) The transmitter consists of a transmit buffer and a transmit shifter. When we want to send information, we first encode the information (usually ASCII code) into a binary stream, and then write a frame of data (usually 8 bits) into the transmit buffer (from here on, the program does not need to worry about it, the rest of the transmission is automatically done by the hardware). The transmit shifter will automatically read a frame of data from the transmit buffer, and then automatically shift (the purpose of the shift is to take out each bit of a frame of data separately), and send it to the Tx transmit line.

(4) The receiver consists of a receive buffer and a receive shifter. When someone sends me information through the serial port line, the information enters my receive shifter through the Rx communication line, and then the receive shifter automatically shifts the binary bit to save it into my receive buffer. After receiving a frame of data, the receiver will generate an interrupt to the CPU. After receiving the interrupt, the CPU knows that the receiver has received a full frame of data and will read this frame of data.

Summary: The send buffer and receive buffer are the key. The work of the send shifter and the receive shifter are automatic and do not need to be controlled by programming. Therefore, the code we write for the serial port is: first initialize (the essence of initialization is to read and write registers) the serial port controller (including the send and receive controllers), then write directly to the send buffer when sending information, and directly read from the receive buffer when receiving information. It can be seen that the low-level work of the serial port (such as how to shift, how to define the start bit, such as TTL level or RS232 level, etc.) is hidden from the programmer, and the programmer does not need to care about it. The interface for software engineers to operate the serial port is the send/receive buffer (essentially the register, the operation method is to read and write memory)

(5) There is a baud rate generator in the serial port controller, which is used to generate the beat clock for serial port sending/receiving. The baud rate generator is actually a clock divider. Its work requires a source clock (from the APB bus), and then divides the source clock internally (configured by software setting registers) to obtain the target clock, and then uses this target clock to generate the baud rate (automatically by hardware).


3. Automatic flow control (AFC)

(1) Why do we need flow control? The purpose of flow control is to make serial communication very reliable. When the sender's speed is faster than the receiver's, flow control can ensure that nothing is missed during sending and receiving. (Flow control principle: the sender adds an extra line, pulls this line high when sending, and then starts sending. When the receiver finds that this line is pulled high, it knows that it is time to receive information, and then pulls this line low when receiving the information. At this time, the sender can know that I am receiving information by pulling this line low. After the receiver receives the information, it returns this line to high to tell the sender that I have processed the data and can now receive it again. Then the process is repeated)

(2) Why is flow control not used now? Nowadays, there are better and more advanced communication methods between computers (USB, Internet), and serial ports have been basically abandoned. Now the serial port is more used by SOC to output debugging information. Since debugging information is not critical information, and due to the development of hardware, the speed of the serial port itself is relatively slow, so the hardware can coordinate the sending and receiving rates. Therefore, flow control has lost its meaning and is now basically abandoned. Flow control is still used in industry.


Serial port controller block diagram:

insert image description here

Keywords:S5PV210 Reference address:S5PV210 serial communication interface_1

Previous article:S5PV210 serial communication interface-2
Next article:Detailed explanation of the s5pv210 clock system block diagram

Recommended ReadingLatest update time:2024-11-16 10:31

Samsung S5PV210 Study Notes (1) First Look at S5PV210
For more information about S5PV210, please refer to the relevant documents S5PV210_UM_REV1.1 S5PV210_iROM_ApplicationNote_Preliminary_20091126 (1 Overview S5PV210 is a 32-bit RISC processor launched by Samsung, which provides cost-effective, low-power and high-performance solutions for mobile devices and general-pur
[Microcontroller]
Samsung S5PV210 Study Notes (1) First Look at S5PV210
S5PV210 Development -- UART Detailed Explanation
The previous article systematically talked about the classification of communication, including parallel communication and serial communication. The classification of serial communication includes synchronous communication and asynchronous communication. In this article we mainly talk about UART We are not unfamil
[Microcontroller]
S5PV210 Development -- UART Detailed Explanation
S5PV210 Development--GPIO
In the previous article, if you want to make the LED light up or the buzzer sound, you need to control the corresponding pins. But how can you use the program to control the level change of the pins? This is what this article will talk about. 1. What is GPIO GPIO is the abbreviation of General Purpose Input Output,
[Microcontroller]
S5PV210 Development--GPIO
TQ210——S5PV210 uboot top-level config.mk analysis
# # (C) Copyright 2000-2006 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. # # See file CREDITS for list of people who contributed to this # project. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Soft
[Microcontroller]
I2C bus and S5PV210 I2C bus controller
1. What is the I2C communication protocol? 1. Physical interface: SCL + SDA (1) SCL (serial clock): Clock line, which transmits CLK signal and is generally the channel for the I2C master device to provide clock to the slave device. (2)SDA (serial data): Data line, communication data is transmitted through the SDA line
[Microcontroller]
I2C bus and S5PV210 I2C bus controller
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号