UART Control and Status Registers
11-8 ADSP-21368 SHARC Processor Hardware Reference
programmed through the
PICR register using the code select value for the
UART receive interrupt (0x13 for UART0 interrupt and 0x14 for UART1
receive interrupt). Similar to I/O mode, both the transmit and receive
interrupts are mapped to the receive interrupt. Then the UARTxIER register
can be used to select the transmit or receive interrupt respectively for I/O
mode. The following examples show two methods of enabling transmit
DMA in I/O mode. The first method uses the DPI interrupt directly.
Listing 11-1. Enabling Transmit DMA (DPI Direct Method)
bit set mode1 IRPTEN; /* enables global interrupts */
bit set imask DPII; /* unmasks DPI interrupt */
ustat1 = UART0_RX_INT;
dm(DPI_IRPTL_RE) = ustat1; /* enables transmit interrupt in
I/O mode */
The second method uses the DPI interrupt by programming the PICR
with the code value of the UART0 receive interrupt (0x13).
Listing 11-2. Enabling Transmit DMA (DPI PICR Method)
#define MASKP14 (0x1f<<10)
#define UART0Rx (0x13<<10)
bit set mode1 IRPTEN;
/* Map the UART0 receive interrupt to P14 using the programmable
interrupt controller */
ustat1 = dm(PICR2);
bit clr ustat1 MASKP14;
bit set ustat1 UART0Rx;
dm(PICR2) = ustat1;
bit set IMASK P14I; /* Unmasks the UART Receive interrupt */