AnsweredAssumed Answered

PIXC and EPPI 's RGBFMTEN can be used together ?

Question asked by qian on Dec 21, 2014
Latest reply on Dec 22, 2014 by qian

Hi,

Board with a RGB666 LCD screen.

When not in use PIXC, images can be displayed properly .

Such a data stream is:MEM(RGB888)->DMA->EPPI-->LCD(RGB666)

EPPI and DMA configuration is as follows :

//These parameters from the data sheet of the LCD screen .

/* Active pixels per line */

#define LCD_ACTIVE_PIXELS_PER_LINE       640//480u

/* Active lines per frame */

#define LCD_ACTIVE_LINES_PER_FRAME       480//272u

/* Number of Horizontal front porch clocks */

#define LCD_HFRONT_PORCH                 16//2u

/* Number of Horizontal back porch clocks */

#define LCD_HBACK_PORCH                  48//2u

/* Horizontal pulse width */

#define LCD_HPULSE_WIDTH                 96//41u

/* Number of vertical front porch (in terms of lines) */

#define LCD_VFRONT_PORCH                 10u//2u

/* Number of back porch (in terms of lines) */

#define LCD_VBACK_PORCH                  33u//2u

/* Vertical pulse width (in terms of lines) */

#define LCD_VPULSE_WIDTH                 2u//10u

/* Vertical pulse width (in terms of lines) */

#define LCD_HPERIOD                   800//525u

/* Vertical pulse width (in terms of lines) */

#define LCD_VPERIOD                 525u//286u

 

#define  LCD_PIXELS_WIDTH    LCD_ACTIVE_PIXELS_PER_LINE

#define  LCD_PIXELS_HEIGHT   LCD_ACTIVE_LINES_PER_FRAME

#define  LCD_PIXELS_DEPTH     3   //Color depth  (RGB888)

 

 

#define  LCD_PIXELS_SIZE  (LCD_PIXELS_WIDTH*LCD_PIXELS_HEIGHT*LCD_PIXELS_DEPTH)

 

void InitEPPI1(void)

{

  *pREG_EPPI1_CTL = ENUM_EPPI_CTL_TXMODE |

   ENUM_EPPI_CTL_NON656 |

   ENUM_EPPI_CTL_SYNC2 |

   ENUM_EPPI_CTL_INTCLK |

   ENUM_EPPI_CTL_INTFS |

   ENUM_EPPI_CTL_PACK_EN |

   ENUM_EPPI_CTL_POLC00 |

   ENUM_EPPI_CTL_FS1LO_FS2LO |

   ENUM_EPPI_CTL_RGBFMT_EN |

   ENUM_EPPI_CTL_ZEROFILL |

   ENUM_EPPI_CTL_DLEN18;  //RGB666

 

  *pREG_EPPI1_CLKDIV = 0X3;

 

  *pREG_EPPI1_LINE  = LCD_HPERIOD;

  *pREG_EPPI1_FRAME = LCD_VPERIOD;

 

  *pREG_EPPI1_HCNT = LCD_ACTIVE_PIXELS_PER_LINE;

  *pREG_EPPI1_VCNT = LCD_ACTIVE_LINES_PER_FRAME;

 

  *pREG_EPPI1_FS1_WLHB  = LCD_HPULSE_WIDTH;

  *pREG_EPPI1_FS1_PASPL = LCD_HPERIOD;

 

  *pREG_EPPI1_FS2_WLVB  = LCD_HPERIOD  * LCD_VPULSE_WIDTH;

  *pREG_EPPI1_FS2_PALPF = LCD_HPERIOD  * LCD_VPERIOD;

 

  *pREG_EPPI1_HDLY = LCD_HPULSE_WIDTH + LCD_HBACK_PORCH-1;

  *pREG_EPPI1_VDLY = LCD_VPULSE_WIDTH + LCD_VBACK_PORCH;

}

void InitDMA(void)

{

  *pREG_DMA33_ADDRSTART = gpLcdDisplayBuf;

  *pREG_DMA33_XCNT = LCD_PIXELS_WIDTH*LCD_PIXELS_DEPTH/4;

  *pREG_DMA33_XMOD = 4;

  *pREG_DMA33_YCNT = LCD_PIXELS_HEIGHT;

  *pREG_DMA33_YMOD = 4;

 

 

  *pREG_DMA33_CFG = ENUM_DMA_CFG_MSIZE04 |

   ENUM_DMA_CFG_PSIZE04 |

   ENUM_DMA_CFG_ADDR2D |

           ENUM_DMA_CFG_SYNC |

           ENUM_DMA_CFG_STOP|

           ENUM_DMA_CFG_YCNT_INT;

           //ENUM_DMA_CFG_AUTO;

}

 

Original image :

112233.jpg

 

But when the EPPI sent via VID connected to PIXC, LCD screen image is 9 points .

Data flow is this: MEM(UYVY422)-->DMA-->PIXC(UYVY->RGB888)-->EPPI-->LCD(RGB666)

The image is scaled and displayed nine .

QQ图片20141222101951.jpg

 

 

void osd_Vss_cfg(void)

{

  *pREG_VID0_CONN = 0x00001000; //PIXC_TX->EPPI1_TX

  ssync();

}

void InitPixc(void)

{

//UYVY to RGB888  OVERLAY is RGB

  *pREG_PIXC0_CONRY  = 0x4002CC80;

  *pREG_PIXC0_CONGU  = 0x7D4E9480;

  *pREG_PIXC0_CONBV  = 0x4E200080;

  *pREG_PIXC0_CCBIAS = 0x31E21F4D;

 

  *pREG_PIXC0_PPL = VIDEO_IN_WIDTH;

  *pREG_PIXC0_LPF = VIDEO_IN_HEIGHT;

 

  *pREG_PIXC0_CTL = (uint32_t)(

          //BITM_PIXC_CTL_OVENA  |

  BITM_PIXC_CTL_OVFRMT |         //RGB

  BITM_PIXC_CTL_ENTC

  );         //半透明

 

  ssync();

 

  *pREG_PIXC0_HSTART_A = 0u;

  *pREG_PIXC0_HEND_A = (uint16_t)OVERLAY_WIDTH;

  ssync();

 

  *pREG_PIXC0_VSTART_A = 0;

  *pREG_PIXC0_VEND_A = (uint16_t)OVERLAY_HEIGHT;

  ssync();

  *pREG_PIXC0_TRANSP_A = 15;//TranspRatio;

  ssync();

  *pREG_PIXC0_TC = 0x070707;//0x00000000;//0x070707;

  ssync();

}

 

//pixc input

void InitDMA35(void)

{

  *pREG_DMA35_ADDRSTART = goVideoInBuf[1];

  ssync();

 

  *pREG_DMA35_XCNT = LCD_PIXELS_WIDTH*2/4;

  *pREG_DMA35_XMOD = 4;

  *pREG_DMA35_YCNT = LCD_PIXELS_HEIGHT;

  *pREG_DMA35_YMOD = (720-640)*2+4;  //window  720x576  ->  640*480

 

 

  *pREG_DMA35_CFG  = (uint32_t)(ENUM_DMA_CFG_ADDR2D |

  ENUM_DMA_CFG_STOP |

  ENUM_DMA_CFG_SYNC |

  ENUM_DMA_CFG_MSIZE04 |

  ENUM_DMA_CFG_PSIZE04 |

  ENUM_DMA_CFG_READ);

  ssync();

}

Outcomes