35.5.1 Write Modes
The following initialization steps are common to all eLCDIF write modes of operation
before entering any particular mode.
Initialization steps:
1. Configure the external I/Os to correctly interface the external display, when required.
2. Start the Display Clock (pix_clk) clock and set the appropriate frequency by
programming the registers in CCM.
3. Start the Bus Clock (apb_clk) and set the appropriate frequency by programming the
registers in CCM.
4. Bring the eLCDIF out of soft reset and disable the clock gate bit.
5. Set the transfer mode of operation to bus master. The LCDIF_CTRL[MASTER] bit
determines the transfer mode selected. To select bus master mode, set
LCDIF_CTRL[MASTER] =1 (to select APBDMA, set LCDIF_CTRL[MASTER]
=0).
6. Set the LCDIF_CTRL[INPUT_DATA_SWIZZLE] according to the endianness of
the eLCDIF controller. Also, set the LCDIF_CTRL[DATA_SHIFT_DIR] and
LCDIF_CTRL[SHIFT_NUM_BITS] if it is required to shift the data left or right
before it is output.
7. Set the LCDIF_CTRL[WORD_LENGTH] field appropriately: 0 = 16-bit input, 1 =
8-bit input, 2 = 18-bit input, 3 = 24/32-bit input. Also, select the correct 16/18/24 bit
data format with the corresponding fields in LCDIF_CTRL register.
8. Set the LCDIF_CTRL1[BYTE_PACKING_FORMAT] field according to the input
frame.
9. Set the LCDIF_CTRL[LCD_DATABUS_WIDTH] appropriately: 0 = 16-bit output,
1 = 8-bit output, 2 = 18-bit output, 3 = 24/32-bit output.
10. Enable the necessary IRQs.