This article implements a uboot boot display logo for am35xskevm.
1. Download the bare metal driver package StarerWare from TI official website.
2. Find the following function in main of rasterDisplay. c and make the following changes:
// Enable backlight
LCDBackLightEnable ();
// Set LCD
SetUpLCD ();
/* Processing the base ceiling
Configure the base address register with base address of the array which contain pixels of the image to be
Displayed and ceiling address register with end address of the same array using API RasterDMAFBConfig ()
*/
RasterDMAFBConfig (0x4830E000,
(Unsigned int) image1,
(Unsigned int) image1 + sizeof (image1)-2,
0 );
RasterDMAFBConfig (0x4830E000,
(Unsigned int) image1,
(Unsigned int) image1 + sizeof (image1)-2,
1 );
/* Enable End of frame0/frame1 interrupt */
RasterIntEnable (0x4830E000, (0x00000100u) | (0x00000200u ));
/* Enable raster */
RasterEnable (0x4830E000 );
And find the SetUpLCD () function.
Static void SetUpLCD (void)
{
/* Enable clock for LCD Module */
LCDModuleClkConfig ();
/* Pin multiplexing registers to enable LCD raster pin and a standard configuration is provided as part of
Function LCDPinMuxSetup () in platform directory
*/
LCDPinMuxSetup ();
/*
** Clock for DMA, LIDD and for Core (which encompasses
** Raster Active Matrix and Passive Matrix logic)
** Enabled.
*/
RasterClocksEnable (LCDC_INSTANCE );
/* Disable raster */
RasterDisable (LCDC_INSTANCE );
/* Configure the pclk
Configure the rate at which pixel data shocould be output by grouping pixel clock frequency by invoking
RasterClkConfig () API
*/
RasterClkConfig (LCDC_INSTANCE, 23040000,192 usd00 );
/* Sort ing DMA of LCD controller
Locking ing the DMA for single or double frame buffer, busrst size for DMA data transfer etc is done
Invoking RasterDMAConfig () API
*/
RasterDMAConfig (LCDC_INSTANCE, RASTER_DOUBLE_FRAME_BUFFER,
RASTER_BURST_SIZE_16, raster_1_o_threshold_8,
RASTER_BIG_ENDIAN_DISABLE );
/* Processing ing modes (ex: tft or stn, color or monochrome etc) for raster controller */
RasterModeConfig (LCDC_INSTANCE, RASTER_DISPLAY_MODE_TFT_UNPACKED,
RASTER_PALETTE_DATA, RASTER_COLOR, RASTER_RIGHT_ALIGNED );
/* Refreshing the polarity of timing parameters of raster controller for example frame clock, pixel clock, line clock etc .*/
Rastertiming2configure (lcdc_instance, raster_frame_clock_low |
Raster_line_clock_low |
Raster_pixel_clock_high |
Raster_sync_edge_rising |
Raster_sync_ctrl_active |
Raster_ac_bias_high, 0,255 );
/* Specify ing horizontal timing parameter */
Rasterhparamconfig (lcdc_instance, 480, 4, 8, 43 );
/* Processing ing vertical timing parameters */
Rastervparamconfig (lcdc_instance, 272, 10, 4, 12 );
/* Configure the required amount of FIFO delay by invoking raster=odmadelayconfig ()*/
Rasterdomainodmadelayconfig (lcdc_instance, 128 );
}
The following is a description of setuplcd() in userguide_02_00_00_07.pdf in the docs:
Programing Sequence
To program the raster controller, the following sequence can be used.
• Enable clock for LCD module.
• Pin multiplexing registers to enable LCD raster pin and a standard configuration is provided as part of
Function LCDPinMuxSetup () in platform directory
• Enable Software Clock for DMA, LIDD submodule and for Core (which encompasses raster active and
Passive matrix logic) by invoking RasterClocksEnable () API.
• Configure the rate at which pixel data shocould be output by refreshing pixel clock frequency by invoking
RasterClkConfig () API.
• Locking ing the DMA for single or double frame buffer, busrst size for DMA data transfer etc is done
Invoking RasterDMAConfig () API.
• Grouping Panel type (TFT or STN), color display or monochrome, 1/2/4/8/16/24 bit per pixel mode (packed or
Unpacked (only for 24 bit) is done invoking RasterModeConfig () API.
• Configure the polarity of various timing parameters (for example frame clock, pixel clock, line clock etc.) used
By raster by invoking rastertiming2configure ()
• Configure the horizontal timing parameters and pixel per line of the raster by invoking rasterhparamconfig ()
API.
• Configure the vertical timing parameters and pixel per panel of the raster invoking rastervparamconfigure ()
API.
• Configure the required amount of FIFO delay by invoking raster?odmadelayconfig ()
• Configure the base address register with base address of the array which contain pixels of the image to be
Displayed and ceiling address register with end address of the same Array Using API rasterdmafbconfig ()
• Enable end of frame 0 and 1 interrupt by invoking rasterintenable () API;
• Enable the raster by inovking rasterenable ()