Screen Parameter Usage Guide¶
REVISION HISTORY¶
| Revision No. | Description |
Date |
|---|---|---|
| 1.0 | 02/22/2024 |
1. Basic Introduction¶
1.1 Overview¶
As the name suggests, screen parameters refer to the parameter configurations used by the screen. This document mainly explains the configuration of point screen, the meaning of screen parameters, and how to set the correct screen parameters.
1.2. Keyword Description¶
-
TTL/BT656
TTL Transistor-Transistor Logic, The interface signal is a digital signal that transmits parallel RGB data.
BT656 The interface signal is a digital signal that transmits YUV data.
2. Screen Parameter Configuration File¶
2.1 Screen Parameter Configuration File Path¶
project\board\$(chip)\$(boardname)\config\config_disp.json
2.2 Screen Parameter Configuration File Composition¶
During the system startup process, the screen parameter configuration file will be parsed, and then different screen parameters will be saved in the system for use by the display module. The display module will obtain the required screen parameters from the system according to the parameter settings of the user calling the API. Please refer to the following for the process of obtaining screen parameters:MI_DISP_API
The composition of the screen parameter configuration file is shown in the following figure. mi_disp is the root node, which contains three child nodes: content, screen parameters and PQ.
The content node is a collection of screen parameter name lists, including two sub-nodes: m_pnlList and m_btList.
-
m_pnlList

m_pnlList lists the screen parameter names of each interface type. User-defined screen parameters can be placed here, but one interface type can only correspond to one screen parameter. If the same type exists, only the first screen parameter will be selected.
-
m_btList

m_btList lists the screen parameter names of BT656 in multiple resolutions.
The screen parameters are composed of section and variable name:

The section refers to the screen parameter name in the figure, EX: "SAT070AT50H18BH".
The variable name refers to the field on the left side of ":", and the right side is the value assigned to the variable name.
The section is unique and do not allow duplicate names, but variable names are allowed. As shown in the figure above, there can only be one section SAT070AT50H18BH, but m_pPanelName can be in different sections. The system distinguishes variable names according to different sections, and then adds different screen parameters.
3. Add Screen Parameters¶
-
The section name of the newly added screen parameter definition is not allowed to be the same as the existing section name
-
Newly added screen parameters can be placed in front of m_pnlList (only the first panel of the same type is valid). If there are screen parameters of the same interface type as the newly added screen parameters in m_pnlList, the original screen parameters of the same interface type can be deleted, or the newly added screen parameters can be added before the original interface screen parameters.
-
The following shows an example of adding new screen parameters in the screen parameter node:
"SAT070AT50H18BH": { "m_wPanelDispPath": 0, "m_pPanelName": "SAT070AT50H18BH", "m_ePanelTiming": 52, "m_ePanelIntfType": 9, "m_wPanelHSyncWidth": 48, "m_wPanelHSyncBackPorch": 46, "m_wPanelVSyncWidth": 4, "m_wPanelVBackPorch": 23, "m_wPanelHStart": 98, "m_wPanelVStart": 27, "m_wPanelWidth": 1024, "m_wPanelHeight": 600, "m_wPanelHTotal": 1344, "m_wPanelVTotal": 635, "m_wPanelDCLK": 51000000, "m_bPanelInvDCLK": 0, "m_bPanelInvDE": 0, "m_bPanelInvHSync": 0, "m_bPanelInvVSync": 0, "m_wSpreadSpectrumFreq": 0, "m_wSpreadSpectrumRatio": 0, "m_ucPanelSwapChnR": 3, "m_ucPanelSwapChnG": 2, "m_ucPanelSwapChnB": 1, "m_ucPanelSwapRgbML": 0 },
4. Screen Parameter Description¶
4.1 Public Parameters¶
| Parameters | Description |
|---|---|
| m_pPanelName | panel name |
| m_ePanelTiming | Output resolution, 52 means user-defined |
| m_ePanelIntfType | Interface type BT656: 3 TTL: 9 |
| m_wPanelHSyncWidth | Line synchronization signal pulse width |
| m_wPanelHSyncBackPorch | Horizontal synchronization signal back porch |
| m_wPanelVSyncWidth | Vertical synchronization signal pulse width |
| m_wPanelVBackPorch | Vertical synchronization signal back porch |
| m_wPanelHStart | m_wPanelHSyncWidth+m_wPanelHSyncBackPorch |
| m_wPanelVStart | m_wPanelVSyncWidth+m_wPanelVBackPorch |
| m_wPanelWidth | Number of effective pixels in horizontal direction |
| m_wPanelHeight | Number of effective pixels in vertical direction |
| m_wPanelHTotal | m_wPanelWidth+m_wPanelHSyncWidth+m_wPanelHSyncBackPorch+HsyncFrontPorch |
| m_wPanelVTotal | m_wPanelHeight+m_wPanelVSyncWidth+m_wPanelVBackPorch+VsyncFrontPorch |
| m_wPanelDCLK | pixel clk: m_wPanelHTotal * m_wPanelVTotal * fps |
| m_bPanelInvDCLK | pixel clk polarity inversion |
| m_bPanelInvHSync | Hsync polarity inversion |
| m_bPanelInvVSync | Vsync polarity inversion |
| m_wSpreadSpectrumFreq | Clock spread spectrum frequency modulation (for details, seespreadSpectrumFreqCalculation) |
| m_wSpreadSpectrumRatio | Clock spread spectrum ratio modulation (for details, seespreadSpectrumFreqCalculation) |
| m_ucPanelSwapChnR | Swap channel R default = 0(Maintain the original connection of the physical circuit, that is, the R channel uses the corresponding signal source in the hardware design) 1: select R(Forcefully cover the channel signal source and replace the R-channel data with the R-channel signal output by the main control) 2: select G 3: select B |
| m_ucPanelSwapChnG | Swap channel G default = 0 1: select R 2: select G 3: select B |
| m_ucPanelSwapChnB | Swap channel B default = 0 1: select R 2: select G 3: select B |
| m_ucPanelSwapRgbML | Swap RGB MSB/LSB 0: disable M/L swap 1: enable M/L swap |
| m_ePanelRgbDataType | RGB data type or LCD data bus 0:E_MI_DISP_MHALPNL_RGB_DTYPE_RGB888, 1:E_MI_DISP_MHALPNL_RGB_DTYPE_RGB666, 2:E_MI_DISP_MHALPNL_RGB_DTYPE_RGB565, 3:E_MI_DISP_MHALPNL_RGB_DTYPE_RGB444, 4:E_MI_DISP_MHALPNL_RGB_DTYPE_RGB333, 5:E_MI_DISP_MHALPNL_RGB_DTYPE_RGB332, 6:E_MI_DISP_MHALPNL_RGB_DTYPE_BGR888, 7:E_MI_DISP_MHALPNL_RGB_DTYPE_BGR666, 8:E_MI_DISP_MHALPNL_RGB_DTYPE_BGR565, 9:E_MI_DISP_MHALPNL_RGB_DTYPE_BGR444, 10:E_MI_DISP_MHALPNL_RGB_DTYPE_BGR333, 11:E_MI_DISP_MHALPNL_RGB_DTYPE_BGR332, 12:E_MI_DISP_MHALPNL_RGB_DTYPE_YUV422_UY0VY1, 13:E_MI_DISP_MHALPNL_RGB_DTYPE_YUV422_VY0UY1, 14:E_MI_DISP_MHALPNL_RGB_DTYPE_YUV422_UY1VY0, 15:E_MI_DISP_MHALPNL_RGB_DTYPE_YUV422_VY1UY0, 16:E_MI_DISP_MHALPNL_RGB_DTYPE_YUV422_Y0UY1V, 17:E_MI_DISP_MHALPNL_RGB_DTYPE_YUV422_Y0VY1U, 18:E_MI_DISP_MHALPNL_RGB_DTYPE_YUV422_Y1UY0V, 19:E_MI_DISP_MHALPNL_RGB_DTYPE_YUV422_Y1VY0U |
| m_ePanelRgbDeltaOddMode | delta mode Odd Field Data Arrangement 0: RGB 1: RBG 2: GRB 3: GBR 4: BRG 5: BGR |
| m_ePanelRgbDeltaEvenMode | delta mode Arrangement of Even Field Data 0: RGB 1: RBG 2: GRB 3: GBR 4: BRG 5: BGR |
| m_ePanelRgbDataSwap | RGB data swap for all data 0: disable 1: enable |
| m_wPadDrvngLvl | Pin drive strength adjustment. Set the drive strength level for all pins of the interface. There are 4 levels in total. 0: 4mA 1: 8mA 2: 12mA 3: 16mA |
Note: 12~13 of m_ePanelRgbDataType are optional for BT interface.m_ucPanelSwapRgbML is used to exchange the high and low bits of RGB data transmission, while m_ePanelRgbDataSwap is used to exchange all RGB data.
Schematic diagram of normal timing for m_bPanelInvDCLK, m_bPanelInvHSync and m_bPanelInvVSync:
Schematic diagram of enabling polarity reversal timing for m_bPanelInvDCLK, m_bPanelInvHSync and m_bPanelInvVSync:
5. Correct Configuration of Screen Parameters¶
To configure the screen parameters correctly, in addition to referring to the table attached to the above list, you also need to adjust the corresponding parameters according to the screen specifications or protocol specifications.
5.1 Screen Specifications¶
The Timing related section can be found in the specifications of most screen chips, as shown in the figure below. If you cannot find this information, please consult with the manufacturer.


| Parameters | Descriptions |
|---|---|
| m_wPanelVSyncWidth | Horizontal Sync. Width |
| m_wPanelHSyncBackPorch | Horizontal Sync. Back Porch |
| m_wPanelVSyncWidth | Vertical Sync. Width |
| m_wPanelVBackPorch | Vertical Sync. Back Porch |
| m_wPanelHStart | m_wPanelHSyncWidth+m_wPanelHSyncBackPorch |
| m_wPanelVStart | m_wPanelVSyncWidth+m_wPanelVBackPorch |
| m_wPanelWidth | 240 (H) |
| m_wPanelHeight | 320 (V) |
| m_wPanelHTotal | m_wPanelHStart+m_wPanelWidth + hfp |
| m_wPanelVTotal | m_wPanelVStart+m_wPanelHeight + vfp |