Synergy Software Package User's Manual
GUIX Port

GUIX Synergy Port Framework Introduction

The SF_EL_GX (GUIX Port) module is the Azure RTOS GUIX adaptation layer for Synergy MCU groups, which have graphics engines GLCDC, DRW (2DG engine) or a JPEG decode engine. The API supports graphics hardware engine setup for GUIX and supports graphics rendering and displaying accelerated by hardware engines. The module defines full-set of GUIX low-level display driver functions which draw graphics accelerated by the DRW (2DG engine) or the JPEG or displays graphics with the GLCDC (See the GUIX User Guide Chapter 5: GUIX Display Drivers). The module encourages the hardware acceleration for graphics rendering, but also allows software processing without hardware support.

Supported and Unsupported Features

The following GUIX features are supported in SSP:

  • RGB565 Pixel Format
  • CLUT8 Pixel Format
  • ARGB888 Pixel Format
  • ARGB8888 Pixel Format
  • Rotation Of Screen: Supported in SSP v2.0.0
  • Dynamic Loading of Binary Resources
  • Hardware and Software JPEG Support

The following features are not supported:

  • ARGB4444 Format                        
  • Multiple Canvases: GUIX allows use of multiple canvases but SSP supports only a single canvas                          

GUIX Synergy Port Framework Module Features

  • Adapts GUIX on top of the SSP
  • Attaches the SSP Display Interface driver to GUIX Display Driver Interface
  • Allows GUIX to draw widgets accelerated by the Synergy D2W (2DG) engine
  • Allows GUIX to draw widgets accelerated by the Synergy JPEG engine
  • Supports double-buffer toggling control for screen transitions without tearing
  • Supports screen rotation (90/180/270 degree)
  • Supports various output color formats
    • 32bpp (ARGB8888, RGB-888)
    • 16bpp (RGB565)
    • 8bpp (8bit Palette (CLUT))
  • Supports user callback functions
sf_el_gx_BD.png
GUIX Synergy Port Framework Module Block Diagram

GUIX Synergy Port Framework Module APIs Overview

The GUIX Synergy Port Framework defines APIs for opening, closing, setup and initialization. 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.

GUIX Synergy Port Framework Module API Summary

Function Name Example API Call and Description
open g_sf_el_gx.p_api->open(g_sf_el_gx.p_ctrl, g_sf_el_gx.p_cfg);
Opens the SF_EL_GX Module. The API can only be called from a thread. The API passes the configuration pointer to define low-level graphics device drivers and frame buffers and register the user callback function. This function does not actually initialize low-level drivers. Instead, the API setup initializes the low-level drivers.
close g_sf_el_gx.p_api->close(g_sf_el_gx.p_ctrl);
Closes the SF_EL_GX Module. This API closes the low-level drivers. Normally, the API is not called since GUIX will not be closed once initialized.
versionGet g_sf_el_gx.p_api->versionGet(&version);
Returns the version of the Module in the version pointer.
setup gx_studio_display_configure (MAIN_DISPLAY,
g_sf_el_gx.p_api->setup, LANGUAGE_ENGLISH,
MAIN_DISPLAY_THEME_1, &p_window_root);
This is the interface to initialize low-level graphics device drivers and must be passed to GUIX through GUIX (Studio) service call gx_studio_display_configure() as the function pointer. GUIX then calls the API back and, at that moment, the API configures the SSP device drivers based on the configuration passed by open. The reason for this procedure to initialize low-level drivers is that the API has the GUIX-compliant argument (GX_DISPLAY *) type and does not allow applying the detailed configuration of the SSP graphics device drivers generated from e2 studio.
canvasInit g_sf_el_gx.p_api->canvasInit(g_sf_el_gx.p_ctrl, p_window_root);
This is the GUIX helper API to determine the memory address of GUIX canvas. The API has an argument with (GX_WINDOW_ROOT *) type and the API provides GUIX the start address of canvas memory, which is needed for the low-level graphics device drivers to draw/display images.
Note
For more complete descriptions of operation and definitions for the function data structures, typedefs, defines, API data, API structures and function variables, review the SSP User's Manual API References for the associated module.

Status Return Values

Name Description
SSP_SUCCESS API call successful.
SSP_ERR_ASSERTION NULL pointer error happens.
SSP_ERR_IN_USE SF_EL_GX is in-use.
SSP_ERR_INTERNAL Error happen in Kernel service calls.
SSP_ERR_NOT_OPEN SF_EL_GX is not opened.
SSP_ERR_TIMEOUT A task times out (or exceeds retry limit) before completion in display driver.
SSP_ERR_D2D_ERROR_DEINT Error occurred in D/AVE 2D driver.
GX_SUCCESS Device driver setup is successfully done.
GX_FAILURE Device driver setup failed.
SSP_ERR_INVALID_CALL Function call was made when the driver is not in SF_EL_GX_CONFIGURED state.
SSP_ERR_D2D_RENDERING The D/AVE 2D returns error at opening a display list buffer.
SSP_ERR_INVALID_ARGUEMENT Invalid non-pointer (for example, parameter) input.
SSP_ERR_UNSUPPORTED Specified color format is not supported.
SSP_ERR_D2D_ERROR_INIT The D/AVE 2D returns error at the initialization.
Note
Lower-level drivers may return common error codes. Refer to the SSP User's Manual API References for the associated module for a definition of all relevant status-return values.

GUIX Synergy Port Framework Module Operational Overview

The following block diagram shows how the sf_el_gx module interfaces with the other Synergy components at the operational level. It also shows the layers at which the callback and low-level modules communicate with the rest of the system. Refer to this diagram while reading the operational overview and operational notes descriptions provided below.

sf_el_gx_FC.png
GUIX Synergy Port Framework Module Flow Chart

Module Initialization

The SF_EL_GX supports the Synergy graphics hardware setup, which is required to run the GUIX system.  The module has a dependency with Azure RTOS GUIXTM and GUIX StudioTM generated code. The GUIX system initialization needs to follow the sequence below as a general guidance.

  1. open SF_EL_GX module to initialize SF_EL_UX control block and pass module configurations.
  2. Initialize GUIX Display object by GUIX Studio generated API gx_studio_display_configure. Through this API, SF_EL_GX setup API is input to GUIX and Synergy graphics hardware setup will complete. Also, the root window initialized by GUIX is output to a user application.
  3. Initialize the primary memory address of a GUIX Canvas Buffer by canvasInit API.
  4. Create the root window by GUIX Studio generated the gx_studio_named_widget_create API.
  5. Show the root window with the GUIX gx_window_show API.
  6. Start the GUIX system withe GUIX gx_system_start API.

Ping-Pong Frame Buffer Management

The SF_EL_GX module manages the buffer toggling operation in the graphics system with a ping-pong frame buffer. The figure below shows a ping-pong buffer graphics system managed by the SF_EL_GX module. The module uses GUIX and the low-level display driver functions to draw an image (2D Drawing engine(DRW) or JPEG) and display the image (DISPLAY module, for example: GLCDC). A design with a single frame buffer is also possible in the SF_EL_GX configuration. However, it is encouraged to use two frame buffers to avoid the tearing issue that could occur in a single frame buffer system.

sf_el_gx_PP.png
GUIX Synergy Port Framework Ping Pong Frame Buffer System

GUIX Synergy Port Framework Module Important Operational Notes and Limitations

GUIX Synergy Port Framework Module Operational Notes

Synergy 2D Drawing Engine Support

The module can draw graphics image accelerated by 2D Drawing engine (DRW) to get better graphics performance. Users can enable 2D Drawing engine with following configurations. The configuration is available through Synergy Configurator.

  • Define GX_USE_SYNEGY_DRW (1) in gx_user.h
  • Set DRW (SF_TES_2D_DRW) interrupt priority

Make sure to select Renesas Synergy in Target CPU setting in the Configure Project window and check Enable Graphics Accelerator in the Synergy Advanced Settings window on the Azure RTOS GUIX Studio (v5.2.8 or later). For the Pixelmap Output Format in the Edit Pixel map window (Right-click on pixelmap->edit settings to open the window), select Compress Output. Do not select Raw Format. This configuration allows the GUIX Studio to generate Targa RLE formatted encoded image resource data. The 2D Drawing engine hardware can read this format and decode and draw the image on the frame buffer.

Synergy JPEG Support

The module can draw graphics image accelerated by JPEG engine to get better graphics performance if a JPEG encoded image is used as a GUIX image resource. Users can enable JPEG engine with following configurations. The configuration is available through Synergy Configurator.

  • Define GX_USE_SYNEGY_JPEG (1) in gx_user.h
  • Set JPEG (R_JPEG_DECODE) interrupt priority

Make sure to select Renesas Synergy in Target CPU setting in the Configure Project window and select Hardware JPEG Decoder in the Decoder Types JPEG: drop-down menu on the Azure RTOS GUIX Studio (v5.2.8 or later). For the Pixelmap Output Format in the Exit Pixel map window (Right-click on pixelmap->edit settings to open the window), select "Raw Format". This configuration allows the GUIX Studio to generate raw JPEG encoded image resource data. JPEG hardware can read this format and decode and draw the image on the frame buffer.

GUIX 5.4.0 API Compatibility Support

The Certain GUI APIs were modified post GUIX 5.4.0 to add support for disabled test colors and to improve the accuracy of certain math functions by using fixed point match parameters. To support existing applications which use the legacy APIs, configure following property in Synergy Configurator. The Legacy APIs can be used by enabling the property.

  • Enable GUI Legacy API Support

The new version of these APIs should be preferred while creating a new application. In order to use new version of these APIs, the GUIX Source should be included in the project and the above property should be disabled.

GUIX Canvas Buffer

With SSP v2.0.0 or later,, the canvas buffer is required only for 180 (or Flip) degree screen rotation. For 180 screen rotation operation, the GUIX first draws the image on a Canvas buffer and then image is flipped and stored in the frame buffer. The size of GUIX Canvas Buffer must be exactly same as a frame buffer for the DISPLAY module. Note that, the use of a GUIX Canvas impacts to the graphics performance because of additional graphics image processing being required. Therefore, GUIX Canvas buffer should be only used if the 180 degree screen rotation is required. Otherwise set NULL to sf_el_gx_cfg_t::p_canvas to let GUIX draw an image directly to frame buffers.

Screen Rotation

The module supports the screen rotation. Supported rotation angle is either of 90, 180, 270 degree in clockwise way and must be set in the GUIX Studio. With SSP v2.0.0 or later, the canvas buffer is not required for the 90 and 270 degree screen rotation and must not be set. However, to enable the 180 degree screen rotation feature, a GUIX Canvas Buffer is still required and should be set in sf_el_gx configuration property. In this case, GUIX draws screen update on a canvas first and then GUIX Port processes the screen copy to a frame buffer with rotating the image by 180 degree. Dynamic screen rotation is not supported. If Synergy 2D Drawing Engine Support is enabled (GX_USE_SYNEGY_DRW = 1), the 180 screen rotation is processed by 2D Drawing engine with texture mapping. If not enabled (GX_USE_SYNEGY_DRW = 0), it is processed by software copy.

Note that starting with the SSP 2.0.0 the configuration option sf_el_gx_cfg_t::rotation_angle is not available. The rotation angle must be set in GUIX Studio project. Make sure to select rotation angle**(either **None, CW, CCW or FLIP) in Rotation setting in the Configure Project window on the Azure RTOS GUIX Studio (v6.1.6.2 or later). The earlier 90 degree Counter Clock wise rotation angle option in  sf_el_gx_cfg_t::rotation_angle is now replaced with CCW option in GUIX Studio. Similarly, earlier 180 and 270 degree rotation options are replaced with FLIP and CW options in GUIX Studio. The (sf_el_gx_cfg_t::p_canvas = non-NULL value) is allowed for rotation angle other than 180 degree, but should not be done. This configuration just consumes extra bus bandwidth for screen image copy from a GUIX Canvas buffer to frame buffers. Therefore, set NULL to sf_el_gx_cfg_t::p_canvas to not use a GUIX Canvas buffer.

Size of JPEG Work Buffer

The JPEG work buffer trades off the JPEG decode speed against the buffer size. When a widget on the screen is formatted in JPEG, the JPEG work buffer is used as a temporary storage memory to create the decoded image. If the buffer size is not large enough for decoding an entire image, JPEG decoding is performed in the output buffer streaming mode. BitBLT operation by 2D Drawing engine decodes a piece of JPEG raster image in the buffer, then transfers it to the frame buffer. The minimum size of JPEG work buffer is {(The number of pixels in the horizontal line) x (bpp (bytes per pixel) of the display format) x 8 (lines)}. For instance, if the decoded image is 800 pixels in a horizontal line and RGB565 format, the number is 800 x 2 x 8= 12 800 (byte). If the buffer size was smaller than this number, JPEG decoding will not be processed. To get better throughput, parameter "Size of the JPEG Work Buffer" should be set as much as larger because it improves the JPEG decode throughput. The JPEG output buffer streaming mode repeats partial JPEG decode operations and the repletion comes to be overhead.

D/AVE 2D Buffer Cache

The D/AVE 2D buffer cache can be enabled or disabled through following configuration in Synergy Configurator. Disable it when images with high resolution and 32 bit ARGB8888 color format are used.

  • D/AVE 2D Frame Buffer Cache (Valid if D/AVE 2D Drawing Engine is enabled)

Screen Tearing in Single Buffer Designs

Screen tearing is a visual artifact in video display where a display device shows information from multiple frames in a single screen draw. In general, a system with a single frame buffer can cause the screen tearing issue on a LCD panel. The module allows users to have single frame buffer (set NULL to sf_el_gx_cfg_t::p_framebuffer_b) but does not care for the screen tearing. It is recommended to have a ping-pong frame buffer system to consist of two frame buffers.

GUIX Synergy Port Framework Module Limitations

SF_EL_GX is only applicable for the Synergy MCU with GLCDC (mandatory), 2D Drawing engine or JPEG engine (optional)

Refer to the most recent SSP Release Notes for any additional operational limitations for this module.

Including the GUIX Synergy Port Framework Module in an Application

This section describes how to include the GUIX Synergy Port Framework module in an application using the SSP configurator.

Note
It is assumed you are familiar with creating a project, adding threads, adding a stack to a thread and configuring a block within the stack. If you are unfamiliar with any of these items, refer to the first few chapters of the SSP User's Manual to learn how to manage each of these important steps in creating SSP-based applications.

To add the GUIX Synergy Port Framework module to an application, simply add it to a thread using the stacks selection sequence given in the following table.

GUIX Synergy Port Framework Module Selection Sequence

Resource ISDE Tab Stacks Selection Sequence
g_sf_el_gx0 GUIX Port on sf_el_gx Threads New Stack> Framework> Graphics> GUIX Port on sf_el_gx

When the GUIX Synergy Port Framework module 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.

 

sf_el_gx_MS.png
GUIX Synergy Port Framework Module Stack

Configuring the GUIX Synergy Port Framework Module

The GUIX Synergy Port Framework module must be configured by the user for the desired operation. The SSP configuration window automatically identifies (by highlighting the block in red) any required configuration selections, such as interrupts or operating modes, which must be configured for lower-level modules for successful operation. 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.

Note
You may want to open your ISDE, create the module and explore the property settings in parallel with looking over the following configuration table values. This helps to orient you and can be a useful hands-on approach to learning the ins and outs of developing with SSP.

Configuration Settings for the GUIX Synergy Port Framework on sf_el_gx

ISDE Property Value Description
Parameter Checking BSP, Enabled, Disabled

Default: BSP
Enable or disable the parameter checking.
Name g_sf_el_gx0 Name of SF_EL_GX instance which will be generated by ISDE. Specify the instance name of this module. Name must be a valid C symbol.
Display Driver Configuration Instance Inherit Graphics Screen 1, Inherit Graphics Screen 2

Default: Inherit Graphics Screen 1
Display drive configuration instance selection.
Name of User Callback function NULL Name of User Callback function invoked by the Module when events happen. It must be a valid C symbol and NULL is allowed.
GUIX Canvas Buffer (required only if rotation angle is FLIP or 180 degree) Used, Not used
Default: Not used
A canvas buffer must be used for FLIP or 180 degree screen rotation. The size of canvas buffer must be exactly the same as a frame buffer for the display module.
Size of JPEG Work Buffer (valid if JPEG hardware acceleration enabled) 768000 The JPEG work buffer size in bytes. Value must be a valid integer value and zero is allowed to be set if JPEG acceleration is not used. Larger buffer size shortens the drawing time. See Size of JPEG Work Buffer.
Memory section for GUIX Canvas Buffer sdram Name of memory section where you want to allocate the GUIX Canvas Buffer. Enter a valid section name defined in the linker script file. Name must be a valid C symbol.
Memory section for JPEG Work Buffer sdram Name of memory section where you want to allocate the JPEG Work Buffer. Enter a valid section name defined in the linker script file. Name must be a valid C symbol.
D/AVE 2 2D Frame Buffer Cache (Valid if D/AVE 2D Drawing Engine is enabled) Enable, Disable
Default: Enable
If Synergy 2D Drawing Engine (DRW) Support is enabled, the rotation is processed by Synergy DRW with texture mapping. If not enabled, the rotation is processed by software copy.
Note
The example settings and defaults are for a project using the S7G2 Synergy MCU Group. Other MCUs may have different default values and available configuration settings.
Most of the property settings for lower-level modules are intuitive and usually can be determined by inspection of the associated properties window from the SSP configurator.

Configuration Settings for the GUIX Synergy Port Framework Lower-Level Modules

Only a small number of settings must be modified from the default for the IP layer and lower-level drivers as indicated via the red text in the thread stack block. Notice that some of the configuration properties must be set to a certain value for proper framework operation and are locked to prevent user modification. The following table identifies all the settings within the properties section for the module:

Configuration Settings for the GLCD HAL Module on r_glcd

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), Disabled

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), Disabled

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), Disabled

Default: Disabled
The driver needs valid interrupt priority setting and it will not work if disabled.
Note
The example settings and defaults are for a project using the S7G2 Synergy MCU Group. Other MCUs may have different default values and available configuration settings.

Configuration Settings for the JPEG Decode Framework on sf_jpeg_decode

ISDE Property Value Description
Parameter Checking BSP, Enabled, Disabled

Default: BSP
Enable or disable the parameter checking.
Name g_sf_jpeg_decode0 The name to be used for a JPEG Decode Framework module instance.
Note
The example settings and defaults are for a project using the S7G2 Synergy MCU Group. Other MCUs may have different default values and available configuration settings.

Configuration Settings for the JPEG Decode Driver on r_jpeg_decode

ISDE Property Value Description
Parameter Checking BSP, Enabled, Disabled

Default: BSP
Enable or disable the parameter error checking.
Name g_jpeg_decode0 The name to be used for a JPEG Decode module instance.
Byte Order for Input Data Format Normal byte order (1)(2)(3)(4)(5)(6)(7)(8),
Byte Swap (2)(1)(4)(3)(6)(5)(8)(7), Word Swap (3)(4)(1)(2)(7)(8)(5)(6),
Word-Byte Swap (4)(3)(2)(1)(8)(7)(6)(5), 
Longword Swap (5)(6)(7)(8)(1)(2)(3)(4),
Longword-Byte Swap (6)(5)(8)(7)(2)(1)(4)(3),
Longword-Word Swap (7)(8)(5)(6)(3)(4)(1)(2),
Longword-Word Swap (7)(8)(5)(6)(3)(4)(1)(2)

Default: Normal Byte order
Specify the byte order for input data. The order is swapped as specified in every 8-byte.
Byte Order for Output Data Format Normal byte order (1)(2)(3)(4)(5)(6)(7)(8),
Byte Swap (2)(1)(4)(3)(6)(5)(8)(7), Word Swap (3)(4)(1)(2)(7)(8)(5)(6),
Word-Byte Swap (4)(3)(2)(1)(8)(7)(6)(5), 
Longword Swap (5)(6)(7)(8)(1)(2)(3)(4),
Longword-Byte Swap (6)(5)(8)(7)(2)(1)(4)(3),
Longword-Word Swap (7)(8)(5)(6)(3)(4)(1)(2),
Longword-Word Swap (7)(8)(5)(6)(3)(4)(1)(2)

Default: Normal Byte order
Specify the byte order for output data. The order is swapped as specified in every 8-byte.
Output Data Color Format Pixel Data RGB565 format, Pixel Data ARGBB888 format

Default: Pixel Data RGB565 format
Specify the output data format.
Alpha value to be applied to decoded pixel data (only valid for ARGB8888 format) 255 Specify the alpha value for the output data format (only valid for ARGB8888 format).
Name of user callback function NULL Specify the name of user callback function.
Decompression Interrupt Priority Priority 0 (highest), Priority 1:14 Priority 15 (lowest - not valid if using ThreadX)

Default: Priority 12
Decompression interrupt priority selection.
Data Transfer Interrupt Priority Priority 0 (highest), Priority 1:14 Priority 15 (lowest - not valid if using ThreadX)

Default: Priority 12
Data transfer interrupt priority selection.
Note
The example settings and defaults are for a project using the S7G2 Synergy MCU Group. Other MCUs may have different default values and available configuration settings.

JPEG Common Instance

ISDE Property Value Description
Name g_sf_jpeg_common Module name.
Note
The example settings and defaults are for a project using the S7G2 Synergy MCU Group. Other MCUs may have different default values and available configuration settings.

Configuration Settings for the D/AVE 2D Driver on dave2d

ISDE Property Value Description
No configurable parameters.
Note
The example settings and defaults are for a project using the S7G2 Synergy MCU Group. Other MCUs may have different default values and available configuration settings.

Configuration Settings for the D/AVE 2D Port sf_tes_2d_drw

ISDE Property Value Description
Work memory size for display lists in bytes 32768 Work memory size for display lists selection
DRW Interrupt Priority Priority 0 (highest), Priority 1:14 Priority 15 (lowest - not valid if using ThreadX)

Default: Priority 12
DRW INT selection.
Note
The example settings and defaults are for a project using the S7G2 Synergy MCU Group. Other MCUs may have different default values and available configuration settings.

GUIX Synergy Port Framework Module Clock Configuration

The GUIX Synergy Port Module is a logical module and therefore does not require any hardware setting except setting the ARM Cortex-M core SysTick timer.

GUIX Synergy Port Framework Module Pin Configuration

The GUIX Synergy Port Module is a logical module and therefore does not require pin settings.

Using the GUIX Synergy Port Framework Module in an Application

These important settings are made in the Synergy Configurator and are used to initialize the module:

  • Setup GLCDC configurations including the module clock setting and GLCDC interrupt priority. Typically, the configuration can be auto-generated through Synergy Configurator.
  • Setup 2D Drawing engine or JPEG engine configurations including the module clock setting and hardware interrupt priorities. Typically, the configuration can be auto-generated through Synergy Configurator.

The steps in using the GUIX Port on sf_el_gx module in a typical application are:

Step 1. Initialize the SF_EL_GX control block and pass module configuration settings by calling the sf_el_gx_api_t::open API.

Step 2. Complete initialization by calling the GUIX Studio generated gx_studio_display_configure API and pass the SF_EL_GX setup function as shown in the illustration below. This function call completes the initialization of Synergy graphics hardware accelerators. Obtain the address of the root window initialized by GUIX through the call.

    gx_studio_display_configure (MAIN_DISPLAY,
                                 g_sf_el_gx0.p_api->setup,
                                 LANGUAGE_ENGLISH,
                                 MAIN_DISPLAY_THEME,
                                 &p_window_root);

Step 3. Initialize the primary memory address GUIX Canvas buffer by calling the sf_el_gx_api_t::canvasInit API.

Step 4. Create the root window by calling the GUIX Studio generated gx_studio_named_widget_create API.

Step 5. Show the root screen by calling the GUIX gx_widget_show API.

Step 6. Start the GUIX system by calling the GUIX gx_system_start API.

Once GUIX system is started, the SF_EL_GX module is driven under GUIX control. The application need not execute any operations after this.

These common steps are illustrated in a typical operational flow in the following figure:

sf_el_gx_TA.png
Flow Diagram of a Typical GUIX Synergy Port Framework Module Application