I didn’t have time to update this thread as I was busy with something else.
Anyway, after several tests I realised that the only way to be able to capture a picture and write it to the SD card without loosing data is not possible directly with CTS module unless using a large buffer, which is not an option on many MCU (ATMEGA328 is having only 2 Kbytes, LPC1343 is having 8 Kbytes, etc) while a full QVGA frame @ 16 bits per pixel is 153 Kbytes!
I had to add a new option to get this sorted out: instead of capturing and streaming the entire frame at once then stream it out I will have to use a different approach:
– Host initiate capture frame request and send number of lines (x) it’s buffer can take;
– CTS will start a frame capture in FIFO then disable FIFO writing;
– CTS will start to stream x lines as instructed by host, once streamed wait for host;
– Once host finished reading data from buffer and write it to SD card send back an acknowledge;
– CTS receive the acknowledge, if correct stream next x lines and wait;
– Repeat cycle until last line was streamed to host or host send terminate command (anything but acknowledge).