Design and Implementation of High Speed UART Based on DMA
- DOI
- 10.2991/eame-18.2018.26How to use a DOI?
- Keywords
- DMA; indefinite length message; external interrupt; UART; timer; timeout interrupt
- Abstract
When using DMA to receive messages, it is necessary to specify the number of bytes needed to be sent to the DMA controller. When the DMA controller receives the specified bytes, DMA transmission interruption is generated. But in practical applications, the number of bytes received by UART is often unfixed. In this paper, data transmission through DMA has a fixed-length problem. We design and implement a way to solve the problem through external interruption and timer matching. This scheme takes into account the advantages of DMA transmission without the need of CPU intervention, and makes up for the defect that it cannot transmit the indefinite length message. The external interruption is generated by an external pin connected to the UART RXD pin, which is associated with the input event of the timer. Set timer as Retrigger mode. After receiving EVENT, the accumulative time of the timer is cleared. When the timer fails to receive EVENT within a certain time, it will go out of time and make message processing in the timeout interrupt service program. Due to the use of timeout interruption for message processing, rather than the fixed length interrupt processing of DMA, it can achieve the reception and processing of indefinite length message, and meet the demand of UART to transmit indefinite long packets.
- Copyright
- © 2018, the Authors. Published by Atlantis Press.
- Open Access
- This is an open access article distributed under the CC BY-NC license (http://creativecommons.org/licenses/by-nc/4.0/).
Cite this article
TY - CONF AU - Feng Zang AU - Honghai Niu PY - 2018/06 DA - 2018/06 TI - Design and Implementation of High Speed UART Based on DMA BT - Proceedings of the 2018 3rd International Conference on Electrical, Automation and Mechanical Engineering (EAME 2018) PB - Atlantis Press SP - 128 EP - 131 SN - 2352-5401 UR - https://doi.org/10.2991/eame-18.2018.26 DO - 10.2991/eame-18.2018.26 ID - Zang2018/06 ER -