Here we only introduce the most commonly used registers related to UART. As for the registers with other functions involved in programming, they are not introduced here.
1.ULCONn(n=0,1,2) //Checksum mode register
[6] 0=Normal mode, 1=Infrared mode
[5:3] 0XX=No check, 100=Odd check, 101=Even check
[2] 0=1 stop bit, 1=2 stop bits
[1:0] 00=5-bit data length, 01=6-bit data length, 10=7-bit data length, 11=8-bit data length
2.UCONn(n=0,1,2) //Working mode register
[10] 0=PCLK, 1=UCLK
[9] 0=Pulse trigger, 1=Level trigger
[8] 0=Pulse trigger, 1=Level trigger
[7] 0=Disable receiving pause, 1=Enable receiving pause
[6] 0=Disable receiving error interrupt, 1=Enable receiving error interrupt
[5] 0=Disable patrol mode, 1=Enable patrol mode
[4] 0=Disable sending interval signal, 1=Send 1 interval signal per frame
[3:2] 00=Disable sending, 01=Interrupt or query sending mode, 1X=DMA mode
[1:0] 00=Disable receiving, 01=Interrupt or query receiving mode, 1X=DMA mode
3.UTRSTATn(n=0,1,2) //Send and receive status register, used to determine whether sending and receiving are completed
[2] 0=The send buffer has data, 1=The buffer has no data
[1] 0=The send buffer has data, 1=The buffer has no data (used in FIFO and DMA mode)
[0] 0=The receive buffer has no data, 1=The receive buffer has data
4. UTXHn and URXHn(n=0,1,2) //Registers used to store data for sending and receiving, directly used as input and output ports
5. It is recommended to use interrupt mode programming here to ensure that no data is lost when a large amount of data is transmitted.
Dedicated pointer: pISR_UART0 //Add interrupt vector here
Previous article:S3C2440 development board uses external interrupts to implement button switching of different functions
Next article:How to declare the clock source frequency of S3C2440 in ADS
Recommended ReadingLatest update time:2024-11-16 12:48
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
- How to send two-way PWM with dead zone complementation in micropython
- TMS320F28335 Serial Port SCI
- Multi-channel current detection
- 【Topmicro Intelligent Display Module】Part 4: Comprehensive evaluation of text scrolling, RTC, etc.
- Display QR code-Intelligent TFT module
- EEWORLD University ---- Open Source PWM Robotic Arm (STM32 Version) Video Tutorial
- [RVB2601 Creative Application Development] Part 4 Sound Histogram
- Waveform changes of different ANT frequencies
- Regulator tube usage help
- [GD32L233C-START Review] IV. USART