What is LCD Direct Drive?

Driving a large color LCD display has traditionally meant either burdening the MCU or adding a separate graphics controller, dedicated frame buffer, dual-ported RAM, or arbitrator, thus adding complexity and BOM cost to a design.

Renesas has gotten around that problem with the introduction of its LCD Direct Drive API, which is demonstrated in the new Embedded GUI Solution Kit. The LCD Direct Drive API transparently transfers the contents of a RAM frame buffer to a WVGA LCD panel with a 60 Hz refresh rate while using less than 2% of the available processor bandwidth (RX62N @ 100 Mhz).

The Embedded GUI kit features a 4.3” WQVGA 480×272 color TFT display driven by a 100 MHz 32-bit Renesas RX63N MCU with 128 KB RAM, and 2 MB Flash. The LCD has a row/column driver chip but no frame buffer or memory; so the MCU must deliver pixel data at a 60 Hz frame rate directly from external SDRAM. The RX63N can do this at high speed utilizing just a few external components.

Utilizing the LCD Direct Drive approach the external SDRAM acts as a buffer for one or more frames of pixel data. The RX MCU delivers data directly from SRAM directly to the LCD under the directions of the External DMA Controller. A timer on the RX controls the LCD refresh rate, delivering a frame of data every 16.6 msec. Software locks/unlocks other programs seeking to access the SDRAM during the 8 msec that data is being transferred to the LCD.

The LCD Direct Drive API executes two “R_DDLCD_DD isrs” once the driver is initialized. These ISRs control the ExDMA and timer channels that transfer data from the external frame RAM to the LCD panel. For optimized performance, one ISR is active during the vertical blanking time, and the other ISR is active during the data transfer portion of the refresh cycle. These ISRs are triggered once per horizontal period (line) of the refresh cycle.

Twice per vertical period (frame) (once before the data transfer starts and once after it ends), the R_DDLCD_ExMemory_isr is triggered to activate the “ExMemoryMonitor” task. This task is responsible for coordinating software’s access to the external bus. Tasks that use the external bus (typically to update the frame RAM) are required to call the “R_DDLCD_ExMemoryAcquire” function to notify the framework. Multiple tasks can be simultaneously registered to access the external bus (up to the configurable DD_EXMEMORY_MANAGER_MAX_TASKS limit). The “ExMemoryMonitor” task suspends all registered tasks at the beginning of the vertical data transfer and resumes these tasks at the beginning of the vertical blanking period. Tasks no longer using external RAM for a period of time can unregister itself by calling “R_DDLCD_ExMemoryRelease”.

The consequence of accessing the external bus without registering is contention for the external bus. If this occurs, the MCU core will be held in a wait state until the ExDMA peripheral has completed its current block transfer; also visible screen artifacts may be seen if the MCU core access delays the start of the ExDMA transfer.

For further information check out the RX600 Series Direct Drive LCD Demonstration application note, sample code, and HEW project files.