I made a platform with LPC1788 (Cortex M3) which had external 8MB NOR flash and external 32MB (16bit) SDRAM. I connected them a CF7670C-V3 (OV7670+AL422B (FIFO)) camera module and I capture QVGA,QQVGA frames in RGB565 format to FIFO and then I save images data to SDRAM perfectly. also I wrote a software on PC and save image data via USART and then show that. I have a big problem with VGA(640x480) resolution. At VGA resolution with RGB565 format, All the time I have picture ,like a on "OV7670 frames are 640x308 not 640x480" post. I search about a Algorithm that I capture a whole color VGA(640x480) frame data in the SDRAM. What can I do? How can I control FIFO_WEN and FIFO_RRST signals to get image data and save in to the SDRAM?
I often wonder why people don't read the datasheet. You will find that the al422 has 384kb of ram (384*1024)<(640*480*2). You need to get the module to output raw bayer data so that (384*1024)>(640*480) and use a demosaicing algorithm to get a full color image. You have plenty of ram and a fast processor to do such.
My guess would be that although the FIFO chip can hold a complete VGA frame, your CPU isn't fast enough to unload the data before it gets overwritten. Therefore, you'll be limited to capturing single frames, rather than continuous video.
You'll need to synchronize the frame capture with the video sync signal from the camera. The easiest thing to do would be to connect the VSYNC output of the camera to an interrupt input on your CPU, and toggle the WEN signal high in the ISR for one frame only. After the second interrupt, when you turn WEN off, is when you can transfer the captured frame from the FIFO to your SDRAM.
You could also set up a simple sequential circuit using a couple of flip-flops to do the same thing in hardware, triggered by a pulse of some sort from the CPU.