
1166
11028E–ATARM–22-Apr-13
SAM9G46
48.9
Double-buffer Technique
The double-buffer technique is used to avoid flickering while the frame being displayed is
updated. Instead of using a single buffer, there are two different buffers, the backbuffer (back-
ground buffer) and the primary buffer (the buffer being displayed).
The host updates the backbuffer while the LCD Controller is displaying the primary buffer. When
the backbuffer has been updated the host updates the DMA Base Address registers.
When using a Dual Panel LCD Module, both base address pointers should be updated in the
same frame. There are two possibilities:
Check the DMAFRMPTx register to ensure that there is enough time to update the DMA
Base Address registers before the end of frame.
Update the Frame Base Address Registers when the End Of Frame IRQ is generated.
Once the host has updated the Frame Base Address Registers and the next DMA end of frame
IRQ arrives, the backbuffer and the primary buffer are swapped and the host can work with the
new backbuffer.
When using a dual-panel LCD module, both base address pointers should be updated in the
same frame. In order to achieve this, the DMAUPDT bit in DMACON register must be used to
validate the new base address.
48.10 2D Memory Addressing
The LCDC can be configured to work on a frame buffer larger than the actual screen size. By
changing the values in a few registers, it is easy to move the displayed area along the frame buf-
fer width and height.
Figure 48-13. Frame Buffer Addressing
In order to locate the displayed window within a larger frame buffer, the software must:
Program the DMABADDR1 (DMABADDR2) register(s) to make them point to the word
containing the first pixel of the area of interest.
Program the PIXELOFF field of DMA2DCFG register to specify the offset of this first pixel
within the 32-bit memory word that contains it.
Displayed Image
Frame Buffer
Base word address &
pixel offset
Line-to-line
address increment