English
Language : 

LM3S5D56 Datasheet, PDF (627/1146 Pages) Texas Instruments – Stellaris® LM3S5D56 Microcontroller
Stellaris® LM3S5D56 Microcontroller
13.4
To enable DMA operation for the receive channel, set the RXDMAE bit of the DMA Control
(UARTDMACTL) register. To enable DMA operation for the transmit channel, set the TXDMAE bit
of the UARTDMACTL register. The UART can also be configured to stop using DMA for the receive
channel if a receive error occurs. If the DMAERR bit of the UARTDMACR register is set and a receive
error occurs, the DMA receive requests are automatically disabled. This error condition can be
cleared by clearing the appropriate UART error interrupt.
If DMA is enabled, then the μDMA controller triggers an interrupt when a transfer is complete. The
interrupt occurs on the UART interrupt vector. Therefore, if interrupts are used for UART operation
and DMA is enabled, the UART interrupt handler must be designed to handle the μDMA completion
interrupt.
See “Micro Direct Memory Access (μDMA)” on page 356 for more details about programming the
μDMA controller.
Initialization and Configuration
To enable and initialize the UART, the following steps are necessary:
1. The peripheral clock must be enabled by setting the UART0, UART1, or UART2 bits in the RCGC1
register (see page 262).
2. The clock to the appropriate GPIO module must be enabled via the RCGC2 register in the
System Control module (see page 271).
3. Set the GPIO AFSEL bits for the appropriate pins (see page 436). To determine which GPIOs to
configure, see Table 22-4 on page 1060.
4. Configure the GPIO current level and/or slew rate as specified for the mode selected (see
page 438 and page 446).
5. Configure the PMCn fields in the GPIOPCTL register to assign the UART signals to the appropriate
pins (see page 453 and Table 22-5 on page 1066).
To use the UART, the peripheral clock must be enabled by setting the appropriate bit in the RCGC1
register (page 262). In addition, the clock to the appropriate GPIO module must be enabled via the
RCGC2 register (page 271) in the System Control module. To find out which GPIO port to enable,
refer to Table 22-5 on page 1066.
This section discusses the steps that are required to use a UART module. For this example, the
UART clock is assumed to be 20 MHz, and the desired UART configuration is:
■ 115200 baud rate
■ Data length of 8 bits
■ One stop bit
■ No parity
■ FIFOs disabled
■ No interrupts
January 23, 2012
627
Texas Instruments-Production Data