UART/IrDA Configuration Example
12-101
UART Devices
The host (MPU or DSP) uses the frame-length information to locate the frame-
boundary in the received frame data. The host can screen bad frames using
the error-status information and later request the sender to resend only the
bad frames.
This status FIFO can be used very effectively in DMA as the host does not
need to be interrupted every time a frame is received, but only whenever the
programmed status FIFO trigger level is reached.
12.10 UART/IrDA Configuration Example
This section outlines the programming stages to operate one UART module
with FIFO, interrupt, and no DMA capabilities. This is a three-step procedure
that ensures quick start of these modules (obviously it does not cover every
UART module feature). The first stage covers software reset of the module
(interrupts, status, and controls); the second stage deals with FIFO configura-
tion and enable; and the last stage deals with baud rate data and stop configu-
ration. The procedure below is programming language agnostic.
12.11 UART Software Reset
The goal of the UART software reset is to clear IER and MCR registers,
remove UART breaks (LCR[6]=0), and put module in reset (MDR1[2:0]=0x3).
The procedure of the UART is as follows:
1) Write into both the IER and MCR register (EFR[4] must first be set to 1).
2) Access the EFR register.
3) 0xBF must first be written to LCR register as follows:
J
LCR=0xBF
J
EFR[4]=1
J
LCR=0x80 (access to IER and MCR is allowed)
J
IER=0x00
J
MCR=0x00; LCR[6]=0 (UART breaks removed)
J
MDR1=0x03 (UART in reset)
UART/IrDA Functional Description / UART/IrDA Configuration Example / UART Software Reset