DBI屏幕参数配置

屏幕参数配置讲解

MCU/8080接口

  • MCU/8080 interface is also the DBI (Display Bus Interface) mode, which is divided into two types: TYPE A and TYPE B.,下图是两种不同接口的连接方式, The main difference is that TYPE A mode combines the read and write signals into a single R/WX signal and adds an E signal, while A mode is divided into Fixed E mode and Clocked E mode., In Fixed E mode, the E signal is fixed at high level 1, and sampling is controlled by the CS signal., In Clocked E mode, sampling is controlled by the E signal, and currently, the platform’s default configuration is this mode.

alt text

  • 下面是两种接口的端口描述

  1. TYPE A

alt text

  1. TYPE A模式下Fixed E 和 Clocked E的区别

alt text

Below is the configuration of DBI TYPE A mode.

static const LCDC_InitTypeDef lcdc_int_cfg =
{
    .lcd_itf = LCDC_INTF_DBI_8BIT_A, /* DBI type A Clocked E模式 */
    .color_mode = LCDC_PIXEL_FORMAT_RGB565,
};
  1. TYPE B

alt text

Below is the configuration of DBI TYPE B mode.

static LCDC_InitTypeDef lcdc_int_cfg_dbi =
{
    .lcd_itf = LCDC_INTF_DBI_8BIT_B, /* DBI type B 模式 */
    .freq = 36000000,
    .color_mode = LCDC_PIXEL_FORMAT_RGB565,

    .cfg = {
        .dbi = {
            .RD_polarity = 0, /* RD polarity selection.*/
            .WR_polarity = 0, /* RD polarity selection.*/
            .RS_polarity = 0, /* RD polarity selection.*/
            .CS_polarity = 0, /* RD polarity selection.*/
#ifdef LCD_RM69330_VSYNC_ENABLE
            .syn_mode = HAL_LCDC_SYNC_VER,
#else
            .syn_mode = HAL_LCDC_SYNC_DISABLE,
#endif /* LCD_RM69330_VSYNC_ENABLE */
            .vsyn_polarity = 1, /* VsncField sync signal, polarity selection.(TE打开后才生效)*/
            //default_vbp=2, frame rate=82, delay=115us,
            //TODO: use us to define delay instead of cycle, delay_cycle=115*48
            .vsyn_delay_us = 0, /* (Vsync)After the TE signal arrives, how long should it be delayed before sending to the screen.(TE打开后才生效) */
            .hsyn_num = 0,  /* (Vsync)After the TE signal arrives, after several clk pulses, delay several clk cycles before sending to the screen.(TE打开后才生效) */
        },
    },

};