Programming Model
13.4.1.3.2 MCU/LIDD DMA Setup: Example Pseudo Code
Suppose we want to send by DMA a section of DDR memory from byte address 0x4 to byte address 0x3C
to the MCU bus using chip select 0. The pseudo code for such an operation is listed below.
// Enable Clocks
wr 006C 0000_0007
// LCD Control Register
wr 0004 0000_8000
// set clock divisor
// LIDD Control Register
wr 000C 0000_000C
// set output bus polarities and lidd_mode_sel
// LIDD CS0 Register
wr 0010 0822_1044
// set bus timing parameters for CS0
// DMA Control Register
wr 0040 0000_0030
// set DMA parameters like burst size, memory layout
// DMA FB0 Base Register
wr 0044 0000_0004
// DMA start byte address
// DMA FB0 Ceiling Register
wr 0048 0000_003C
// DMA end byte address
// LIDD Control Register - enable DMA
wr 000C 0000_010C
// Flip LIDD DMA enable bit
Once the DMA completes sending data to the Async FIFO, the Eof0 interrupt will occur. The Done
interrupt will occur when the last word is written out the MPU bus.
The CPU must bring cfg_lidd_dma_en low before the CPU can directly initiate MPU bus transactions or
for the DMA module to start again.
13.4.1.4 Passive Matrix
13.4.1.4.1 Monochrome Bitrate Awareness
In a mostly testbench related note, care must be taken when configuring the module for Passive Matrix
(cfg_lcdtft = ‘0’) monochrome (cfg_lcdbw = ‘1’) modes. In passive matrix mode, the Blue component of the
Grayscaler output is used as the quantized value for each scan order pixel.
When cfg_mono8b=’1’, eight pixel values must be sent through the grayscaler before one 8-bit output is
ready. This output data represents the passive matrix output states for eight pixels.
Likewise, when cfg_mono8b=’0’, four pixel values must be sent through the grayscaler before one 4-bit
output is ready. This output data represents the passive matrix output states for four pixels.
The problem arises when the output clock is fast (cfg_clkdiv=0x2). The data path must output a value
every two system clocks. However, it takes four or eight system clocks to generate a data element to be
output. In this case, the LCD module returns an underflow interrupt.
In practice, such a situation does not occur because passive matrix panels are slow by design.
1124
LCD Controller
SPRUH73H – October 2011 – Revised April 2013
Copyright © 2011–2013, Texas Instruments Incorporated