SCI DMA Interface
1729
SPNU563A – March 2018
Copyright © 2018, Texas Instruments Incorporated
Serial Communication Interface (SCI) Module
30.4.2 Transmit DMA Requests
DMA functionality is enabled/disabled by the CPU with SET TX DMA/CLR TX DMA bits, respectively.
The TXRDY flag is set when the SCI transfers the contents of SCITD to SCITXSHF. The TXRDY flag
indicates that SCITD is ready to be loaded with more data. In addition, the SCI sets the TX EMPTY bit if
both the SCITD and SCITXSHF registers are empty.
Transmit DMA requests are enabled by the setting SET TX DMA and SET TX INT bits. If the SET TX
DMA bit is set, then a TX DMA request is sent to the DMA when data is written to SCITD and TXRDY is
set. In other words, CPU needs to write the first data to start a DMA block transfer. For example, we want
to transmit a data buffer of 20 bytes. DMA will be set up to transmit 19 bytes. The first data for DMA to
transfer is the second byte in the buffer. CPU will have to write the first byte in the buffer to the SCITD
register to start the transfer.
.
30.5 SCI Configurations
Before the SCI sends or receives data, its registers should be properly configured. Upon power-up or a
system-level reset, each bit in the SCI registers is set to a default state. The registers are writable only
after the RESET bit in the SCIGCR0 register is set to 1. Of particular importance is the SWnRST bit in the
SCIGCR1 register. The SWnRST is an active-low bit initialized to 0 and keeps the SCI in a reset state
until it is programmed to 1. Therefore, all SCI configuration should be completed before a 1 is written to
the SWnRST bit.
The following list details the configuration steps that software should perform prior to the transmission or
reception of data. As long as the SWnRST bit is cleared to 0 the entire time that the SCI is being
configured, the order in which the registers are programmed is not important.
•
Enable SCI by setting the RESET bit to 1.
•
Clear the SWnRST bit to 0 before SCI is configured.
•
Select the desired frame format by programming the SCIGCR1 register.
•
Set both the RX FUNC and TX FUNC bits in SCIPIO0 to 1 to configure the SCIRX and SCITX pins for
SCI functionality.
•
Select the baud rate to be used for communication by programming the BRS register.
•
Set the CLOCK bit in SCIGCR1 to 1 to select the internal clock.
•
Set the CONT bit in SCIGCR1 to 1 to make SCI not halt for an emulation breakpoint until its current
reception or transmission is complete (this bit is used only in an emulation environment).
•
Set LOOP BACK bit in SCIGCR1 to 1 to connect the transmitter to the receiver internally (this feature
is used to perform a self-test).
•
Set the RXENA bit in SCIGCR1 to 1, if data is to be received.
•
Set the TXENA bitin SCIGCR1 to 1, if data is to be transmitted.
•
Set the SWnRST bit to 1 after SCI is configured.
•
Perform receiving or transmitting data (see
or