Hi all, I am doing a video project,using BF548EZ-Kit and OV7620 image sensor. The sensor is connected directly to the borad via EPPI1 interface. For testing, a single frame can be captured after setting up the DMA13 and EPPI1 configuration. I use image viewer to display a image with a start address that I specified in the DMA start address. The problem is every time I got a frame, it seems that the image is not sychronized well.It is like a image is splited into two part,and it swaps at the top and the bottom. The EPPI status register reports a error (EPPIx_STATUS = 0x0024). i.e. Frame Track Underflow Error. When the image I got is correct(the whole frame), the error disappears. I struggled to figure out where the problem is but without success. My configuration of EPPI1,DMA and port muxing setting is as follow. Any help would be appreciate! void InitPorts(void) { //activate PortE 14,15 for TWI SDA and SCL *pPORTE_FER = Px14 | Px15; ssync(); // set FERF for PPI Data 0-7 *pPORTD_FER = 0x00FF; //PortD is PPI1 //ssync(); // set FERF for PPI CLK PORTE is for PCLK(PE11),PFS1(PE12),PFS2 (PE13). *pPORTE_FER = 0x3800; //0011 1000 0000 0000 ssync(); } void InitDMA(void) { *pDMA13_START_ADDR = Frame; //(0x300000) *pDMA13_X_COUNT = PIXEL_PER_LINE; //320 *pDMA13_X_MODIFY = 0x1; *pDMA13_Y_COUNT = LINES_PER_FRAME; //240 *pDMA13_Y_MODIFY = 0x1; *pDMA13_CONFIG = DI_EN | WNR | WDSIZE_8 | DMA2D | AUTOBUFFERMODE; ssync(); }//end Init_DMA void InitEPPI1() { // - EPPI disabled first // - EPPI in receive mode // - GP 2 mode //Skipping enabled //FS1 is active high and FS2 is active low, FS1 and FS2 sre connected to Hsync and Vsync respectively. // - sample data on rising edge and sample/drive syncs on rising edge // - DLEN = 8 bits *pEPPI1_CONTROL = 0x0006592C; ssync(); // total lines is 640 *pEPPI1_LINE = 640; ssync(); //The PPI is set to receive 525 lines for each frame *pEPPI1_FRAME = 240; // OV7620 default mode is interlace with 240 lines per frame ssync(); }
EPPI Sychronization problem on BF548 EZ-kit
Started by ●September 19, 2009
Reply by ●September 20, 20092009-09-20
hbd730 wrote:> Hi all, > > > I am doing a video project,using BF548EZ-Kit and OV7620 image sensor.Do you really expect anyone to check your initialization code for free? VLV
Reply by ●September 20, 20092009-09-20
> >Do you really expect anyone to check your initialization code for free? > >VLV >Well,how much money do you want?
Reply by ●September 20, 20092009-09-20
hbd730 wrote:>>Do you really expect anyone to check your initialization code for free? >> > > Well,how much money do you want?If you would like me to work on your project, the contact is at the web site. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com