Functional Description
1090
SLAU723A – October 2017 – Revised October 2018
Copyright © 2017–2018, Texas Instruments Incorporated
External Peripheral Interface (EPI)
16.3.3 DMA Operation
The µDMA can be used to achieve maximum transfer rates on the EPI through the NBRFIFO and the
WFIFO. The µDMA has one channel for write and one for read. For writes, the EPI DMA Transmit Count
(EPIDMATXCNT) register is programmed with the total number of transfers by the µDMA. An equivalent
value is programmed into the DMA Channel Control Word (DMACHCTL) register of the uDMA at offset
0x008. A µDMA request is asserted by the EPI WRFIFO when the TXCNT value of the EPIDMATXCNT
register is greater than zero and the WTAV bit field of the EPIWFIFOCNT register is less than the
programmed threshold trigger, WRFIFO, of the EPIFIFOLVL register. The write channel continues to write
data until the TXCNT value in the EPIDMATXCNT register is zero.
NOTE:
When the WRFIFO bit in the EPIFIFOLVL register is set to 0x4 and the application bursts
four words to an empty FIFO, the WRFIFO trigger may or may not deassert depending on if
all four words were written to the WRFIFO or if the first word was passed immediately to the
function requiring it. Thus, the application may not see the WRRIS bit in the EPIRIS register
clear on a burst of four words.
The nonblocking read channel copies values from the NBRFIFO when the NBRFIFO is at the level
specified by the EPIFIFOLVL register. For nonblocking reads, the start address, the size per transaction,
and the count of elements must be programmed in the µDMA. Both nonblocking read register sets can be
used, and they fill the NBRFIFO such that one runs to completion, then the next one starts (they do not
interleave). Using the NBRFIFO provides the best possible transfer rate.
For blocking reads, the µDMA software channel (or another unused channel) is used for memory-to-
memory transfers (or memory to peripheral, where some other peripheral is used). In this situation, the
µDMA stalls until the read is complete and is not able to service another channel until the read is done. As
a result, the arbitration size should normally be programmed to one access at a time. The µDMA controller
can also transfer from and to the NBRFIFO and the WFIFO using the µDMA software channel in memory
mode, however, the µDMA is stalled once the NBRFIFO is empty or the WFIFO is full. When the µDMA
controller is stalled, the core continues operation. For more information on configuring the µDMA, see
.
The size of the FIFOs must be taken into consideration when configuring the µDMA to transfer data to and
from the EPI. The arbitration size should be 4 or less when writing to EPI address space and 8 or less
when reading from EPI address space.
16.4 Initialization and Configuration
To enable and initialize the EPI controller, the following steps are necessary:
1. Enable the EPI module using the RCGCEPI register, see
.
2. Enable the clock to the appropriate GPIO module using the RCGCGPIO registers (see
To find out which GPIO port to enable, see the device-specific data sheet.
3. Set the GPIO AFSEL bits for the appropriate pins, see
. To determine which GPIOs to
configure, see the device-specific data sheet.
4. Configure the GPIO current level and/or slew rate as specified for the mode selected, see
and
5. Configure the PMCn fields in the GPIOPCTL register to assign the EPI signals to the appropriate pins
(see
and the device-specific data sheet).
6. Select the mode for the EPI block to SDRAM, HB8, HB16, or general parallel use, using the MODE
field in the EPI Configuration (EPICFG) register. Set the mode-specific details (if needed) using the
appropriate mode configuration EPI Host Bus Configuration (EPIHBnCFGn) registers for the desired
chip-select configuration. Set the EPI Main Baud Rate (EPIBAUD) and EPI Main Baud Rate 2
(EPIBAUD2) register if the baud rate must be slower than the system clock rate.
7. Configure the address mapping using the EPI Address Map (EPIADDRMAP) register. The selected
start address and range is dependent on the type of external device and maximum address (as
appropriate). For example, for a 512-megabit SDRAM, program the ERADR field to 0x1 for address
0x6000.0000 or 0x2 for address 0x8000.0000; and program the ERSZ field to 0x3 for 256MB. If using
General-Purpose mode and no address at all, program the EPADR field to 0x1 for address