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:
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
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Timing Constraint Training.rar
- Today at 10:00 AM, live broadcast with prizes: The best assistant in human-machine interaction interface and machine vision applications—Renesas Electronics
- DSP digital anti-noise module for airborne communication equipment
- (Transfer) Bluetooth BLE GATT complete analysis and application
- Why do OEMs like to specify Ethernet connectors?
- "Play Board" + Shared Bicycle Control Panel 1
- Wire harness disc abnormal noise test
- Mid-Autumn Festival and Teachers' Day are coming together. I heard that there are only three times in a century.
- Liyuan Award Live Broadcast: Interpreting ON Semiconductor Power Solutions, Transforming Server Power Supplies and Solar Inverters
- CC2640R2F Battery Fuel Measurement