![]() |
Synergy Software Package User's Manual
|
The Graphics LCD Controller (GLCDC) HAL module provides a high-level API for graphics display applications and uses the Graphics LCD Driver peripheral on the Synergy MCU. A user-defined callback can be created to handle frame buffer switching and underflow detection.
The GLCDC HAL supports the following features:
The following hardware features are, or are not, supported by the SSP for the GLCDC:
Legend:
| Symbol | Meaning |
|---|---|
| ✓ | Available (Tested) |
| ⌧ | Not Available (Not tested/not functional or both) |
| N/A | Not supported by MCU |
| MCU Group | Single Color Background Plane | Graphics 1 Plane | Graphics 2 Plane | Support 16 bit per pixel graphics | Support 32 bit per pixel graphics | Support 1-bit LUT |
|---|---|---|---|---|---|---|
| S124 | N/A | N/A | N/A | N/A | N/A | N/A |
| S128 | N/A | N/A | N/A | N/A | N/A | N/A |
| S1JA | N/A | N/A | N/A | N/A | N/A | N/A |
| S3A1 | N/A | N/A | N/A | N/A | N/A | N/A |
| S3A3 | N/A | N/A | N/A | N/A | N/A | N/A |
| S3A6 | N/A | N/A | N/A | N/A | N/A | N/A |
| S3A7 | N/A | N/A | N/A | N/A | N/A | N/A |
| S5D3 | N/A | N/A | N/A | N/A | N/A | N/A |
| S5D5 | N/A | N/A | N/A | N/A | N/A | N/A |
| S5D9 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| S7G2 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| MCU Group | Support 4-bit LUT | Support 8-bit LUT | Support All Pixel formats | Supports Alpha Blending | Video Signal Timing Adjustment | Supports All Output Data formats |
|---|---|---|---|---|---|---|
| S124 | N/A | N/A | N/A | N/A | N/A | N/A |
| S128 | N/A | N/A | N/A | N/A | N/A | N/A |
| S1JA | N/A | N/A | N/A | N/A | N/A | N/A |
| S3A1 | N/A | N/A | N/A | N/A | N/A | N/A |
| S3A3 | N/A | N/A | N/A | N/A | N/A | N/A |
| S3A6 | N/A | N/A | N/A | N/A | N/A | N/A |
| S3A7 | N/A | N/A | N/A | N/A | N/A | N/A |
| S5D3 | N/A | N/A | N/A | N/A | N/A | N/A |
| S5D5 | N/A | N/A | N/A | N/A | N/A | N/A |
| S5D9 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| S7G2 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| MCU Group | Supports All Dithering Modes | Support output of VSYNC, HSYNC **and Horizontal Data Enable** | Supports Brightness and Contrast | Supports Gamma Correction |
|---|---|---|---|---|
| S124 | N/A | N/A | N/A | N/A |
| S128 | N/A | N/A | N/A | N/A |
| S1JA | N/A | N/A | N/A | N/A |
| S3A1 | N/A | N/A | N/A | N/A |
| S3A3 | N/A | N/A | N/A | N/A |
| S3A6 | N/A | N/A | N/A | N/A |
| S3A7 | N/A | N/A | N/A | N/A |
| S5D3 | N/A | N/A | N/A | N/A |
| S5D5 | N/A | N/A | N/A | N/A |
| S5D9 | ✓ | ✓ | ✓ | ✓ |
| S7G2 | ✓ | ✓ | ✓ | ✓ |
The GLCDC HAL module defines APIs for opening, closing, starting, stopping and controlling the display of information on an LCD panel. A complete list of the available APIs, an example API call and a short description of each can be found in the following table. A table of status return values follows the API summary table.
GLCDC HAL Module API Summary
| Function Name | Example API Call and Description |
|---|---|
| open | g_display.p_api->open (g_display.p_ctrl, g_display.p_cfg);Open display device. |
| close | g_display.p_api->close (g_display.p_ctrl);Close display device. |
| start | g_display.p_api->start(g_display.p_ctrl);Display start. |
| stop | g_display.p_api->stop(g_display.p_ctrl);Display stop. |
| layerChange | g_display.p_api->layerChange(g_display.p_ctrl, &layercng)Change layer parameters at runtime. |
| correction | g_display.p_api->correction(g_display.p_ctrl, &display_correction)Color correction. |
| clut | g_display.p_api->clut(g_display.p_ctrl, &clut)Set CLUT for display device. |
| statusGet | g_display.p_api->statusGet(g_display.p_ctrl, &status)Get status for display device. |
| versionGet | g_display.p_api->versionGet(&version)Retrieve the API version using the version pointer. |
Status Return Values
| Name | Description |
|---|---|
| SSP_SUCCESS | API call successful. |
| SSP_ERR_ASSERTION | Parameter has invalid value. |
| SSP_ERR_INVALID_ARGUMENT | Invalid parameter in the argument. |
| SSP_ERR_HW_LOCKED | GLCDCC resource is locked. |
| SSP_ERR_CLOCK_GENERATION | Dot clock cannot be generated from clock source. |
| SSP_ERR_INVALID_TIMING_SETTING | Invalid panel timing parameter. |
| SSP_ERR_INVALID_LAYER_SETTING | Invalid layer setting found. |
| SSP_ERR_INVALID_LAYER_FORMAT | Invalid format is specified. |
| SSP_ERR_INVALID_GAMMA_SETTING | Invalid gamma correction setting found. |
| SSP_ERR_NOT_OPEN | The function call is performed when the driver state is not equal to DISPLAY_STATE_CLOSED. |
| SSP_ERR_INVALID_UPDATE_TIMING | A function call is performed when the GLCDC is updating register values internally. |
| SSP_ERR_INVALID_MODE | Function call is performed when the driver state is not DISPLAY_STATE_OPENED. |
| SSP_ERR_INVALID_CLUT_ACCESS | Illegal CLUT entry or size is specified. |
| p_version | The version number. |
The GLCDC HAL module controls an LCD panel. The following figure shows an overview of the graphics data flow using the GLCDC HAL module. The module supports reading graphics frame image data from memory (up to two frames) and blending those images on top of the monochrome background screen. The driver supports CLUT memory and specifies the graphic frame format for the CLUT.
The following figure shows a display system with a ping-pong frame buffer. It is recommended to have more than two frame buffers in a display system to avoid image tearing, which happens in a single frame buffer display system. In such designs, the GLCDC hardware can read a graphics frame image from one of the frame buffers while the image drawing engines (for example, DRW and JPEG), CPU or DMAC/DTC transfer a graphics frame image to another frame buffer simultaneously. The module supports frame buffer toggling by the display_api_t::layerChange API at run-time.
Screen Format
The following figure shows the relationship between the LCD screen format and LCD timing parameters of the GLCDC module. The module has generic timing parameters for the LCD panel setting that support a variety of LCD panels.
Front Porch Period
The GLCDC module does not have a setting for horizontal/vertical front porch cycles/lines. Those cycles/lines must be included in the total horizontal cycles/vertical lines setting.
Example Parameter Settings
PE-HMI1 v2.0 board (LXD Research & Display, LLC, M7504A):
The following example adjusts the horizontal total cycles, vertical total lines, and panel clock division ratio to generate an LCD panel refresh rate of 60 Hz. Regarding symbols for the LCD panel, see the M7504A data sheet.
LCD Panel Parameter Settings - PE-HMI1 v2.0 Board
DK-S7G2 v3.0 board (LXD Research & Display, LLC, M7190A):
The following example adjusts the horizontal total cycles, vertical total lines and panel clock division ration to generate an LCD panel refresh rate of 60 Hz. Regarding symbols for the LCD panel, see the M7190A data sheet.
LCD Panel Parameter Settings - DK-S7G2 v3.0 Board
SK-S7G2 v2.0 board (ILI Technology Corp., IL9341C):
The following example sets the horizontal total cycles, and vertical total lines as large as allowed for the panel for an LCD panel refresh rate of about 76.8 Hz. Regarding symbols for the LCD panel, see the LIL9314V data sheet.
LCD Panel Parameter Settings - SK-S7G2 v2.0 Board
CLUT
The GLCDC module supports a Color Look-Up Table that is used if the color format is ARGB1555, CLUT8, CLUT4, or CLUT1. The CLUT API can update CLUT0/CLUT1 SRAM (implemented inside the GLCDC hardware) for each of the graphics foreground or background screens.
You can also call the CLUT API at run-time to update CLUT SRAM.
Line Repeating Mode
Line Repeating is an important mode, especially for a system that does not have enough of memory. In this mode, the GLCDC module reads a raster image, which has fewer pixels than the LCD panel screen size, and displays the raster repeatedly on the screen. The following figure shows an example of a screen image constructed by reading a small raster image repeatedly in the background graphics plane.
Gamma Correction
Gamma Correction is used to change the color characteristic of LCD panels to a flat characteristic. The following figure shows the gamma correction curve, which can be configured by the GLCDC module. The module supports 16 threshold values for the input color level for each (R, G, B) color and defines the gain level for each of 16 areas divided by thresholds.
You have the option to configure multiple GLCDC interrupts covered in the following sections:
Line Detection Interrupt
The line detection interrupt is used to indicate when the GLCDC finishes outputting all lines to the LCD panel and goes into the blanking period. Use this interrupt to handle frame buffer switching in a graphics system and uses frame buffers with more than two frames.
Layer1 or Layer2 Line Buffer Underflow Interrupt
You can use the GLCDC layer1 or layer2 buffer underflow interrupt to detect lack of memory bandwidth in your system. The buffer underflow occurs when the graphics data transfer from memory (for example, SDRAM or SRAM) to the GLCDC internal line buffer is blocked by the other data transfer, and not enough against the data transfer from GLCDC line buffer to the LCD panel interface. You have to design the graphics system to prevent this interrupt from occurring.
GLCDC Callbacks
A user callback function can be registered in open. If a user callback function is provided, the callback function is called from the interrupt service routine (ISR) each time an interrupt happens. The argument of the callback function event can take the following enumerated value listed the table, so that a user can identify which event occurred in the graphics system. DISPLAY_EVENT_LINE_DETECTION event is used for switching frame buffers to update the screen, and DISPLAY_EVENT_GRn_UNDERFLOW event is used for error handling if an underflow occurs.
Event and Interrupt Summary
| Name of Event | Name of Interrupt | Condition for the Event |
|---|---|---|
| DISPLAY_EVENT_LINE_DETECTION | Line detection | When GLCDC is done outputting the last line in the active video region |
| DISPLAY_EVENT_GR1_UNDERFLOW | Graphics 1 underflow | When GLCDC underflows during reading the data for graphics1 plane |
| DISPLAY_EVENT_GR2_UNDERFLOW | Graphics 2 underflow | When GLCDC underflows during reading the data for graphics2 plane |
This section describes how to include the GLCDC HAL Module in an application using the SSP configurator.
To add the Display Driver to an application, simply add it to a thread using the stacks selection sequence given in the following table. (The default name for the Display Driver is g_display0. This name can be changed in the associated Properties window.)
GLCDC HAL Module Selection Sequence
| Resource | ISDE Tab | Stacks Selection Sequence |
|---|---|---|
| g_display0 Display Driver on r_glcdc | Threads | New Stack> Driver> Graphics> Display Driver on r_glcdc |
When the Display Driver on r_glcdc is added to the thread stack as shown in the following figure, the configurator automatically adds any needed lower‑level modules. Any modules needing additional configuration information have the box text highlighted in Red. Modules with a Gray band are individual modules that stand alone. Modules with a Blue band are shared or common; they need only be added once and can be used by multiple stacks. Modules with a Pink band can require the selection of lower-level modules; these are either optional or recommended. (This is indicated in the block with the inclusion of this text.) If the addition of lower-level modules is required, the module description include Add in the text. Clicking on any Pink banded modules brings up the New icon and displays possible choices.
The GLCDC HAL Module must be configured by the user for the desired operation. The available configuration settings and defaults for all the user-accessible properties are given in the properties tab within the SSP configurator and are shown in the following tables for easy reference. Only properties that can be changed without causing conflicts are available for modification. Other properties are locked and not available for changes and are identified with a lock icon for the locked property in the Properties window in the ISDE. This approach simplifies the configuration process and makes it much less error-prone than previous manual approaches to configuration. The available configuration settings and defaults for all the user-accessible properties are given in the Properties tab within the SSP Configurator and are shown in the following tables for easy reference.
Configuration Settings for the GLCDC HAL Module on r_glcdc
| ISDE Property | Value | Description |
|---|---|---|
| Parameter Checking | BSP, Enabled, Disabled Default: BSP | Enable or disable the parameter checking. |
| Name | g_display0 | The name to be used for a GLCDC module control block instance. This name is also used as the prefix of the other variable instances. |
| Name of display callback function to be defined by user | NULL | Name must be a valid C symbol. |
| Input - Panel clock source select | Internal clock (GLCDCLK), External clock (LCD_EXTCLK) Default: Internal clock (GLCDCLK) | Choose the panel clock source depends on your system. |
| Input - Graphics screen1 | Used, Not used Default: Used | Specify "Used" if the graphics screen N is used. Then the frame buffer named "display_fb_background" for graphics screen1 and "display_fb_foreground" for graphics screen2 is auto-generated by ISDE. If not using either of the graphics screens, specify "Not used". Then the frame buffer is not created. Note that there is no memory read access to the frame buffer when you specify "Not used", which reduces the consumption of bus bandwidth. |
| Input - Graphics screen1 frame buffer name | fb_background | Custom name for frame buffer. |
| Input - Number of Graphics screen1 frame buffer | 2 | Number of graphics selection. |
| Input - section where Graphics screen1 frame buffer allocated | sdram | Specify the section name to allocate the frame buffer. This is valid if "Input - Graphics screen1" is set as "Used." |
| Input - Graphics screen1 input horizontal size | 800 | Specify the number of horizontal pixels. Default value is the size for an image with 800x480 pixels |
| Input - Graphics screen1 vertical size | 480 | Specify the number of vertical pixels. Default value is the size for an image with 800x480 pixels. |
| Input - Graphics screen1 input horizontal stride (not bytes but pixels) | 800 | Specify the memory stride for a horizontal line. This value must be specified with the number of pixels, not actual bytes. Typically, this parameter is set to same number as parameter 'input horizontal size'. Default value is the size for an image with 800x480 pixels. |
| Input - Graphics screen1 input format | 32bits ARGB888, 32bits RGB888, 16bits RGB565, 16bits ARGB1555, 16bits ARGB4444, CLUT 8, CLUT 4, CLUT 1 Default: 16bits RGB565 | Specify the graphics screen Input format. If selecting CLUT formats, you must write CLUT data using clut before performing start. Default setting supports a RGB565 formatted image. |
| Input - Graphics screen1 input line descending | Used, Not used Default: Not used | Specify "On" if image data descends from the bottom line to the top line in the frame buffer. Usually "Off". |
| Input - Graphics screen1 input line repeat | On, Off Default: Off | Specify "On" if expecting to repeatedly read a raster image which is smaller than the LCD panel size. Usually "Off". For details, see the description of Line Repeating function. |
| Input - Graphics screen1 input line repeat times | 0 | Specify the number of repeating times for a raster image which is read repeatedly in a frame. |
| Input - Graphics screen1 layer coordinate X | 0 | Specify the horizontal offset in pixels of the graphics screen from the background screen. |
| Input - Graphics screen1 layer coordinate Y | 0 | Specify the vertical offset in pixels of the graphics screen from the background screen. |
| Input - Graphics screen1 layer background color alpha | 255 | Based on the alpha value, either the graphics screen2 (foreground graphics screen) is blended into the graphics screen1 (background graphics screen) or the graphics screen1 is blended into the monochrome background screen. |
| Input - Graphics screen1 layer background color Red | 255 | Specify the background color in the graphics screen N. |
| Input - Graphics screen1 layer background color Green | 255 | Specify the background color in the graphics screen N. |
| Input - Graphics screen1 layer background color Blue | 255 | Specify the background color in the graphics screen N. |
| Input - Graphics screen1 layer fading control | None, Fade-in, Fade-out Default: None | Specify "On" when performing a fade-in for the graphics screen. The transparent screen changes gradually to opaque. Specify "Off" when performing the fade-out for the graphics screen. The opaque screen changes gradually to transparent. Note that this processing is accelerated by the GLCDC hardware and cannot stop once started. The transition status can be monitored by statusGet. |
| Input - Graphics screen1 layer fade speed | 0 | Specify the number of frames for the fading transition to complete. |
| Input - Graphics screen2 | Used, Not used Default: Not used | Specify "Used" if the graphics screen N is used. Then the frame buffer named "display_fb_background" for graphics screen1 and "display_fb_foreground" for graphics screen2 is auto-generated by ISDE. If not using either of the graphics screens, specify "Not used". Then the frame buffer is not created. Note that there is no memory read access to the frame buffer when you specify "Not used", which reduces the consumption of bus bandwidth. |
| Input - Graphics screen2 frame buffer name | fb_foreground | Custom name for frame buffer. |
| Input - Number of Graphics screen2 frame buffer | 2 | Number of graphics selection. |
| Input - section where Graphics screen2 frame buffer allocated | sdram | Specify the section name to allocate the frame buffer. This is valid if "Input - Graphics screen1" is set as "Used." |
| Input - Graphics screen2 input horizontal size | 800 | Specify the number of horizontal pixels. Default value is the size for an image with 800x480 pixels |
| Input - Graphics screen2 vertical size | 480 | Specify the number of vertical pixels. Default value is the size for an image with 800x480 pixels. |
| Input - Graphics screen2 input horizontal stride (not bytes but pixels) | 800 | Specify the memory stride for a horizontal line. This value must be specified with the number of pixels, not actual bytes. Typically, this parameter is set to same number as parameter 'input horizontal size'. Default value is the size for an image with 800x480 pixels. |
| Input - Graphics screen2 input format | 32bits ARGB888, 32bits RGB888, 16bits RGB565, 16bits ARGB1555, 16bits ARGB4444, CLUT 8, CLUT 4, CLUT 1 Default: 16bits RGB565 | Specify the graphics screen Input format. If selecting CLUT formats, you must write CLUT data using clut before performing start. Default setting supports a RGB565 formatted image. |
| Input - Graphics screen2 input line descending | On, Off Default: Off | Specify "On" if image data descends from the bottom line to the top line in the frame buffer. Usually "Off". |
| Input - Graphics screen2 input line repeat | On, Off Default: Off | Specify "On" if expecting to repeatedly read a raster image which is smaller than the LCD panel size. Usually "Off". For details, see the description of Line Repeating function. |
| Input - Graphics screen2 input line repeat times | 0 | Specify the number of repeating times for a raster image which is read repeatedly in a frame. |
| Input - Graphics screen2 layer coordinate X | 0 | Specify the horizontal offset in pixels of the graphics screen from the background screen. |
| Input - Graphics screen2 layer coordinate Y | 0 | Specify the vertical offset in pixels of the graphics screen from the background screen. |
| Input - Graphics screen2 layer background color alpha | 255 | Based on the alpha value, either the graphics screen2 (foreground graphics screen) is blended into the graphics screen1 (background graphics screen) or the graphics screen1 is blended into the monochrome background screen. |
| Input - Graphics screen2 layer background color Red | 255 | Specify the background color in the graphics screen N. |
| Input - Graphics screen2 layer background color Green | 255 | Specify the background color in the graphics screen N. |
| Input - Graphics screen2 layer background color Blue | 255 | Specify the background color in the graphics screen N. |
| Input - Graphics screen2 layer fading control | None, Fade-in, Fade-out Default: None | Specify "On" when performing a fade-in for the graphics screen. The transparent screen changes gradually to opaque. Specify "Off" when performing the fade-out for the graphics screen. The opaque screen changes gradually to transparent. Note that this processing is accelerated by the GLCDC hardware and cannot stop once started. The transition status can be monitored by statusGet. |
| Input - Graphics screen2 layer fade speed | 0 | Specify the number of frames for the fading transition to complete. |
| Output - Horizontal total cycles | 1024 | Specify the total cycles in a horizontal line. Set to the number of cycles defined in the data sheet of LCD panel sheet in your system. Default value matches the LCD panel on S7G2 PE-HMI1 board. |
| Output - Horizontal active video cycles | 800 | Specify the number of active video cycles in a horizontal line. Set to the number of cycles defined in the data sheet of LCD panel sheet in your system. Default value matches the LCD panel on S7G2 PE-HMI1 board. |
| Output - Horizontal back porch cycles | 46 | Specify the number of back porch cycles in a horizontal line. Back porch starts from the beginning of Hsync cycles, which means back porch cycles contain Hsync cycles. Set to the number of cycles defined in the data sheet of LCD panel sheet in your system. Default value matches the LCD panel on S7G2 PE-HMI1 board. |
| Output - Horizontal sync signal cycles | 20 | Specify the number of Hsync signal assertion cycles. Set to the number of cycles defined in the data sheet of LCD panel sheet in your system. Default value matches LCD panel on S7G2 PE-HMI1 board. |
| Output - Horizontal sync signal polarity | Low active, High active Default: Low active | Select the polarity of Hsync signal to match your system. Default setting matches the LCD panel on S7G2 PE-HMI1 board. |
| Output - Vertical total lines | 525 | Specify number of total lines in a frame. Set to the number of lines defined in the data sheet of LCD panel sheet in your system. Default value matches the LCD panel on S7G2 PE-HMI1 board. |
| Output - Vertical active video lines | 480 | Specify the number of active video lines in a frame. Set to the number of lines defined in the data sheet of LCD panel sheet in your system. Default value matches the LCD panel on S7G2 PE-HMI1 board. |
| Output - Vertical back porch lines | 23 | Specify the number of back porch lines in a frame. Back porch starts from the beginning of Vsync lines, which means back porch lines contain Vsync lines. Set to the number of lines defined in the data sheet of LCD panel sheet in your system. Default value matches the LCD panel on S7G2 PE-HMI1 board. |
| Output - Vertical sync signal lines | 10 | Specify the Vsync signal assertion lines in a frame. Set to the number of lines defined in the data sheet of LCD panel sheet in your system. Default value matches the LCD panel on S7G2 PE-HMI1 board. |
| Output - Vertical sync signal polarity | Low active, High active Default: Low active | Select the polarity of Vsync signal to match to your system. Default setting matches LCD panel on S7G2 PE-HMI1 board. |
| Output - Format | 24bits RGB888, 18bits RGB666, 16bits RGB565, 8bits serial Default: 24bits RGB888 | Specify the graphics screen output format to match to your LCD panel. Default setting matches the LCD panel on S7G2 PE-HMI1 board. |
| Output - Endian | Little endian, Big endian Default: Little endian | Select data endian for output signal to LCD panel. Default setting matches the LCD panel on S7G2 PE-HMI1 board. |
| Output - Color order | RGB, BGR Default: RGB | Select data order for output signal to LCD panel. The order of blue and red can be swapped if needed. Default setting matches the LCD panel on S7G2 PE-HMI1 board. |
| Output - Data Enable Signal Polarity | Low active, High active Default: High active | Select the polarity of Data Enable signal to match to your system. Default setting matches the LCD panel on S7G2 PE-HMI1 board. |
| Output - Sync edge | Rising Edge, Falling Edge Default: Rising Edge | Select the polarity of Sync signals to match to your system. Default setting matches the LCD panel on S7G2 PE-HMI1 board. |
| Output - Background color alpha channel | 255 | Specify the background color of the background screens. |
| Output - Background color R channel | 0 | Specify the background color of the background screens. |
| Output - Background color G channel | 0 | Specify the background color of the background screens. |
| Output - Background color B channel | 0 | Specify the background color of the background screens. |
| CLUT | Used, Not used Default: Not used | Specify "Used" if selecting CLUT formats for a graphics screen input format. Then, a buffer named "CLUT_buffer" for the CLUT source data is generated in the ISDE auto-generated source file. |
| CLUT - CLUT buffer size | 256 | Specify the number of entries for the CLUT source data buffer. Each entries consumes 4 bytes (1 word). Words of CLUT source data specified by this parameter are generated in the ISDE auto-generated source file. |
| TCON - Hsync pin select | Not used, LCD_TCON0, LCD_TCON1, LCD_TCON2, LCD_TCON3 Default: LCD_TCON0 | Select the TCON pin used for the Hsync signal to match to your system. Default setting is for LCD panel on S7G2 PE-HMI1 board. |
| TCON - Vsync pin select | Not used, LCD_TCON0, LCD_TCON1, LCD_TCON2, LCD_TCON3 Default: LCD_TCON1 | Select TCON pin used for Vsync signal to match to your system. Default setting is for LCD panel on S7G2 PE-HMI1 board. |
| TCON - DataEnable pin select | Not used, LCD_TCON0, LCD_TCON1, LCD_TCON2, LCD_TCON3 Default: LCD_TCON2 | Select TCON pin used for DataEnable signal to match to your system. Default setting is for LCD panel on S7G2 PE-HMI1 board. |
| TCON - Panel clock division ratio | 1/1, 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/12, 1/16, 1/24, 1/32 Default: 1/8 | Select the clock source divider value. See the note at bottom of this table about the source clock for the pixel clock. |
| Color correction - Brightness | Off, On Default: Off | Specify "On" when performing brightness control. If specifying "Off", the setting below does not affect the output color. |
| Color correction - Brightness R channel | 512 | Output color level is calculated as follows: Output color level = Input color level +/ - 512. Set the value for each of R, G, B channels. |
| Color correction - Brightness G channel | 512 | Output color level is calculated as follows: Output color level = Input color level +/ - 512. Set the value for each of R, G, B channels. |
| Color correction - Brightness B channel | 512 | Output color level is calculated as follows: Output color level = Input color level +/ - 512. Set the value for each of R, G, B channels. |
| Color correction - Contrast | Off, On Default: Off | Specify "On" when performing contrast control. If specifying "Off", the setting below does not affect the output color. |
| Color correction - Contrast(gain) R channel | 128 | Output color level is calculated as follows: Output color level = Input color level x (/128). Set the value for each of R, G, B channels. |
| Color correction - Contrast(gain) G channel | 128 | Output color level is calculated as follows: Output color level = Input color level x (/128). Set the value for each of R, G, B channels. |
| Color correction - Contrast(gain) B channel | 128 | Output color level is calculated as follows: Output color level = Input color level x (/128). Set the value for each of R, G, B channels. |
| Color correction - Gamma correction(Red) | Off, On Default: Off | Control for each channel R/G/B. Specify "On" when performing gamma correction for the red channel. If specifying "Off", the settings for gain and threshold do not affect the output color. |
| Color correction - Gamma gain R[0-15] | 0 | Set the gain value for the red channel in the area N on the gamma correction curve. The gain setting for area N is applied to the input data with a color level between ((Gamma threshold R[N-1])<<2) and ((Gamma threshold R[N])<<2). The output value is calculated as follows: Output color level = Input color level / 1024 (/128). |
| Color correction - Gamma threshold R[0-15] | 0 | Set the threshold value for the red channel in the area N on the gamma correction curve. The gain setting for area N is applied to the input data with a color level between Gamma threshold R[N-1] and Gamma threshold R[N]. The output value is calculated as follows: Output color level = Input color level / 1024 (/128). |
| Color correction - Gamma correction(Green) | Off, On Default: Off | Control for each channel R/G/B. Specify "On" when performing gamma correction for the red channel. If specifying "Off", the settings for gain and threshold do not affect the output color. |
| Color correction - Gamma gain G[0-15] | 0 | Set the gain value for the red channel in the area N on the gamma correction curve. The gain setting for area N is applied to the input data with a color level between ((Gamma threshold R[N-1])<<2) and ((Gamma threshold R[N])<<2). The output value is calculated as follows: Output color level = Input color level / 1024 (/128). |
| Color correction - Gamma threshold G[0-15] | 0 | Set the threshold value for the red channel in the area N on the gamma correction curve. The gain setting for area N is applied to the input data with a color level between Gamma threshold R[N-1] and Gamma threshold R[N]. The output value is calculated as follows: Output color level = Input color level / 1024 (/128). |
| Color correction - Gamma correction(Blue) | Off, On Default: Off | Control for each channel R/G/B. Specify "On" when performing gamma correction for the red channel. If specifying "Off", the settings for gain and threshold do not affect the output color. |
| Color correction - Gamma gain B[0-15] | 0 | Set the gain value for the red channel in the area N on the gamma correction curve. The gain setting for area N is applied to the input data with a color level between ((Gamma threshold R[N-1])<<2) and ((Gamma threshold R[N])<<2). The output value is calculated as follows: Output color level = Input color level / 1024 (/128). |
| Color correction - Gamma threshold B[0-15] | 0 | Set the threshold value for the red channel in the area N on the gamma correction curve. The gain setting for area N is applied to the input data with a color level between Gamma threshold R[N-1] and Gamma threshold R[N]. The output value is calculated as follows: Output color level = Input color level / 1024 (/128). |
| Dithering | Off, On Default: Off | Dithering enable. Specify "On" when applying the dither effect to reduce the banding in case of selecting RGB666 or RGB565 output formats. Dithering can be applied when converting. If specified "Off", the settings for dithering below do not affect the output. For details on the dither effect, see Output Control Block Panel Dither Correction Register (OUT_PDTHA) in the hardware manual. |
| Dithering - Mode | Truncate, Round off, 2x2 Pattern Default: Truncate | Specify the dither mode. For detail, see the Output Control Block Panel Dither Correction Register (OUT_PDTHA) in the hardware manual. |
| Dithering - Pattern A | Pattern 00, Pattern 01, Pattern 10, Pattern 11 Default: Pattern 11 | Specify the dither pattern for 2X2 pattern mode. For details, see the Output Control Block Panel Dither Correction Register (OUT_PDTHA) in the hardware manual. |
| Dithering - Pattern B | Pattern 00, Pattern 01, Pattern 10, Pattern 11 Default: Pattern 11 | Specify the dither pattern for 2X2 pattern mode. For details, see the Output Control Block Panel Dither Correction Register (OUT_PDTHA) in the hardware manual. |
| Dithering - Pattern C | Pattern 00, Pattern 01, Pattern 10, Pattern 11 Default: Pattern 11 | Specify the dither pattern for 2X2 pattern mode. For details, see the Output Control Block Panel Dither Correction Register (OUT_PDTHA) in the hardware manual. |
| Dithering - Pattern D | Pattern 00, Pattern 01, Pattern 10, Pattern 11 Default: Pattern 11 | Specify the dither pattern for 2X2 pattern mode. For details, see the Output Control Block Panel Dither Correction Register (OUT_PDTHA) in the hardware manual. |
| Misc - Correction Process Order | Brightness and Contrast then Gamma, Gamma then Brightness and Contrast Default: Brightness and Contrast then Gamma | Specify the color correction processing order if needed. |
| Line Detect Interrupt Priority | Priority 0 (highest), Priority 1:14 Priority 15 (lowest - not valid if using ThreadX), Default: Disabled | The driver needs valid interrupt priority setting and it will not work if disabled. |
| Underflow 1 Interrupt Priority | Priority 0 (highest), Priority 1:14 Priority 15 (lowest - not valid if using ThreadX), Default: Disabled | The driver needs valid interrupt priority setting and it will not work if disabled. |
| Underflow 2 Interrupt Priority | Priority 0 (highest), Priority 1:14 Priority 15 (lowest - not valid if using ThreadX), Default: Disabled | The driver needs valid interrupt priority setting and it will not work if disabled. |
The GLCDC module can generate the pixel clock from either of the following clock sources (the source clock selection is available through Synergy Configuration in e2 studio):
The GLCDC module uses pins on the MCU to communicate to external devices. I/O pins must be selected and configured as required by the external device. The pin selection table lists methods to select pins within the SSP configuration window and the configuration settings table lists an example depicting selection of GLCDC pins:
Pin Selection for the GLCDC HAL Module on r_glcdc
| Resource | ISDE Tab | Pin selection Sequence |
|---|---|---|
| GLCDC | Pins | Select Peripherals> Graphics: GLCDC> GLCDC0 |
Pin Configuration Settings for GLCDC HAL Module on r_glcd
| Property | Value | Description |
|---|---|---|
| Pin Group Selection | Mixed, _A Only, _B Only Default: Mixed | Pin group selection. |
| Operation Mode | Disabled, Custom, RGB888, RGB666, RGB565 Default: Disabled | Select desired operation mode. |
| LCD_CLK | None, P900, P101 Default: None | LCD_CLK Pin. |
| LCD_DATA00:15 | None, Pn, Pm Default: None | LCD_DATA Pins. |
| LCD_TCON0:3 | None, Pn, Pm Default: None | LCD_TCON Pins. |
| LCD_EXTCLK | None, Pn, Pm Default: None | LCD_EXTCLK Pin. |
To synchronize application code to the completion of drawing current frame buffer, use the Line Detection Interrupt and notify the timing to application code through the GLCDC callback.
These common steps are illustrated in a typical operational flow diagram in the following figure: