Digi NS9750 Computer Hardware User Manual


 
www.digiembedded.com
607
Serial Control Module: UART
When the system is configured to operate in little endian mode, the least
significant bytes in the word written to the FIFO are read first. For
example, the long word
0x11223344 results in the character 0x44 being read
first, and
0x11 being read last.
When reading from the receive FIFO, the processor must perform a long word read
operation. Each time a read cycle to the receive FIFO is performed, the receive FIFO
advances to the next long word entry. The processor cannot read individual bytes
from the same FIFO long word entry.
Processor interrupts vs. DMA
The receive FIFO can be emptied using processor interrupts or the DMA controller.
Using processor interrupts
The processor can read one long word (4 bytes) of data from the receive FIFO when
the RRDY field (in "Serial Channel B/A/C/D Status Register A" on page 617) is set
active high. The long word read may have 1, 2, 3, or 4 bytes of valid data within the
word. The number of valid bytes is determined by the bit encoding in the RXFDB field
in Serial Channel B/A/C/D Status Register A. The RXFDB field must be read before the
FIFO Data register is read.
The RBC bit in Serial Channel B/A/C/D Status Register A indicates that a receive data
buffer has been closed and receiver status can be read from this register. Before
additional data can be read from the FIFO, the RBC bit must be acknowledged by
writing a 1 to the same bit position in Serial Channel B/A/C/D Status Register A.
These steps provide the recommended process flow for the serial port receiver
interrupt service routine:
1 Read Serial Channel B/A/C/D Status Register A.
2 If RRDY is true:
a Read the data FIFO.
b Use the RXFDB field to pick out valid bytes.
3 If RBC is true:
a Record receiver buffer closed status (if you want to).
b Write a 1 to the RBC bit position in Serial Channel B/A/C/D Status register
A.
c Read Serial Channel B/A/C/D Status Register A again.