Understanding of UART FIFO

Publisher:行者无疆1978Latest update time:2016-01-08 Source: eefocusKeywords:UART  FIFO Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
   Necessity of FIFO. When performing UART communication, the interrupt method is simpler and more efficient than the polling method. However, if there is no transceiver FIFO, each data (5 to 8 bits) transmitted must be interrupted and processed once, and the efficiency is still not high. If there is a transceiver FIFO, an interrupt can be generated only after a number of data (up to 14) are continuously sent and received, and then processed together. This greatly improves the efficiency of transceiver.
 
 
  Receive timeout problem. If there is no receive timeout function, the interrupt will not be triggered when the other party has finished sending but the receive FIFO is not full (the interrupt will be triggered only when the FIFO is full), resulting in the problem that the valid data received at the end cannot be processed. With the receive timeout function, if the receive FIFO is not full and the other party has stopped sending, the timeout interrupt will be triggered within the reception time of no more than 3 data, so the data will be processed as usual.
 
 
  When sending, as long as the send FIFO is not full, the data is continuously put in, and the send subroutine is directly exited after it is put in. Then, when the FIFO is actually sent, an interrupt will be automatically generated to notify the main program: I have completed the real sending.
 
 
  When receiving, if the other party sends continuously, after the FIFO is filled, it will notify the main program in an interrupt manner and say: Now a batch of data has arrived, please process it.
 
 
  It doesn't matter if the other party sends intermittently. When the interval is too long (2 to 3 character transmission time), an interrupt will occur. This time it is a timeout interrupt, which notifies the main program that the other party may have completed sending, but the FIFO is not full, so please handle it.
Keywords:UART  FIFO Reference address:Understanding of UART FIFO

Previous article:S3C2440 UART operation (FIFO interrupt mode)
Next article:Analysis of the working principle of ARM MMU

Recommended ReadingLatest update time:2024-11-16 13:49

How to use printf instead of uart to print data in STM32
.Add in the program: (the header file needs to add #include )  #ifdef __GNUC__  #define PUTCHAR_PROTOTYPE int __io_putchar(int ch)  #else  #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f)  #endif   PUTCHAR_PROTOTYPE  {  USART_SendData(USART1, (u8) ch);  while (USART_GetFlagStatus(USART1, USART_FLAG_TC) ==
[Microcontroller]
Basic Applications of UART Serial Communication
  1. Three basic types of communication   The communications we commonly use can usually be divided into simplex, half-duplex, and full-duplex communications.   Simplex means that only one party is allowed to send information to the other party, while the other party cannot send information back. For example, our
[Microcontroller]
Uart Operation of Tiny4412
#include "regs.h" void enable_mmu(unsigned long ttb); void init_ttb(unsigned long *ttb_base); void mmap(unsigned long *ttb_base, unsigned long va, unsigned long pa); void memset(char *buf, char ch, int size); void memcpy(char *dst, char *src, int size); void do_irq(unsigned long regs ); void uart3_putc(unsigned char c
[Microcontroller]
stm8s jumps out of the interrupt program c language, STM8 UART receives the interrupt program
software design /*---------------------------------------------------------------------- Experimental content: USART sends and receives data by itself, and uses the LED of the PB port to indicate the received data to see if it is consistent with the sent data. --------------------------------------------------------
[Microcontroller]
STM8S_ 004_UART basic data transmission and reception
Preface Ⅰ People who do software development know the importance of printing information. When it comes to printing information, we have to talk about UART serial port printing. For people who do microcontroller development, the main source of printing information is UART serial port printing. Therefore, knowledge a
[Microcontroller]
STM8S_ 004_UART basic data transmission and reception
Atmega128 serial port UART 0/1 test code
#include avr/io.h #define fosc 7372800UL //晶振7.3728MHZ #define baud 9600//波特率 #define com0 void uart0_init(void) {      UCSR0B = 0x00; //disable while setting baud rate      UCSR0A = 0x00;      UCSR0C =(1 UCSZ01)|(1 UCSZ00);//8bit+1bit stop      UBRR0L=(fosc/16/(baud+1))%256;      UBRR0H=(fosc/16/(baud+1))/256;     
[Microcontroller]
Summary of STM32 UART DMA transmission
Using DMA transmission, you can continuously obtain or send a piece of information without interruption or delay. It is very useful when communication is frequent or there is a large amount of information to be transmitted.   From the table above, we can see that to use USART1TX/RX we select channels 4 and 5 1. DMA t
[Microcontroller]
【ARM】2410 bare metal series-uart serial communication
Development Environment (1) Hardware platform: FS2410 (2) Host: Ubuntu 12.04 Schematic diagram of FS2410 serial port   Serial UART register configuration   Configure TXD0 and RXD0 (GPH2, GPH3) Set Baud Rate (UBRDIVn) Set the transmission format (ULCONn) Select clock source and interrupt mode (UCONn)
[Microcontroller]
【ARM】2410 bare metal series-uart serial communication
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号