Functional Description
13.3.3 DMA Engine
The DMA engine provides the capability to output graphics data to constantly refresh LCDs, without
burdening the CPU, via interrupts or a firmware timer. It operates on one or two frame buffers, which are
set up during initialization. Using two frame buffers (ping-pong buffers) enables the simultaneous
operation of outputting the current video frame to the external display and updating the next video frame.
The ping-pong buffering approach is preferred in most applications.
When the Raster Controller is used, the DMA engine reads data from a frame buffer and writes it to the
input FIFO (as shown in
). The Raster Controller requests data from the FIFO for frame
refresh; as a result, the DMA’s job is to ensure that the FIFO is always kept full.
When the LIDD Controller is used, the DMA engine accesses the LIDD Controller's address and/or data
registers.
To program the DMA engine, configure the following registers, as shown in
.
Table 13-5. Register Configuration for DMA Engine Programming
Register
Configuration
LCDDMA_CTRL
Configure DMA data format
LCDDMA_FB0_BASE
Configure frame buffer 0
LCDDMA_FB0_CEILING
LCDDMA_FB1_BASE
Configure frame buffer 1. (If only one frame buffer is used, these two
registers will not be used.)
LCDDMA_FB1_CEILING
In addition, the LIDD_CTRL register (for LIDD Controller) or the RASTER_CTRL register (for Raster
Controller) should also be configured appropriately, along with all the timing registers.
To enable DMA transfers, the LIDD_DMA_EN bit (in the LIDD_CTRL register) or the LCDEN bit (in the
RASTER_CTRL register) should be written with 1.
13.3.3.1 Interrupts
Interrupts in this LCD module are related to DMA engine operation. Four registers are used to control and
monitor the interrupts:
•
The IRQENABLE_SET register allows the user to enable any of the interrupt sources.
•
The IRQENABLE_CLEAR register allows the user to disable interrupts sources.
•
The IRQSTATUS_RAW register collects all the interrupt status information.
•
The IRQSTATUS register collects the interrupt status information for all enabled interrupts. Any
interrupt source not enabled in the IRQENABLE_SET register is masked out.
13.3.3.1.1 LIDD Mode
When operating in LIDD mode, the DMA engine generates one interrupt signal every time the specified
frame buffer has been transferred completely.
•
The DONE bit in the LIDD_CTRL register specifies if the interrupt signal is delivered to the system
interrupt controller, which in turn may or may not generate an interrupt to CPU.
•
The EOF1, EOF0, and DONE bits in the IRQSTATUS_RAW register reflect the interrupt signal,
regardless of being delivered to the system interrupt controller or not.
13.3.3.1.2 Raster Mode
When operating in Raster mode, the DMA engine can generate the interrupts in the following scenarios:
1. Output FIFO under-run. This occurs when the DMA engine cannot keep up with the data rate
consumed by the LCD (which is determined by the LCD_PCLK.) This is likely due to a system memory
throughput issue or an incorrect LCD_PCLK setting. The FUF bit in IRQSTATUS_RAW is set when
this error occurs. This bit is cleared by writing a 1 to the FUF bit in the IRQSTATUS register.
1105
SPRUH73H – October 2011 – Revised April 2013
LCD Controller
Copyright © 2011–2013, Texas Instruments Incorporated