Adding header and/or footer to INFIFO before starting GPIF and/or GPIF got idle.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi,

   

I'm working on a USB-camera with an Aptina-sensor connected to the EZUSB on GPIF interface. After couple of issues at the begining, everything works quite fine sofar. There is however one more requirement I need to fullfil and after trying for some time now, I'm getting out of ideas...

   

I should maintain a sequence number, incremented with each frame sent to the host, and put the sequence number along each frame-data either as a header before or as a footer after the data.

   

I tried to put the sequence number to the FIFO before starting GPIF (starting wave once for each frame), which never succeeded. It always gets overwritten by the frame-data. I read in this forum, that GPIF normally starts filling the FIFO from the start. That would explain the behaviour... Is there any way to change this and prepend some header before the frame-data (make the GPIF to start filling the FIFO from some other position than the start) ?

   

As a second try, I'm trying to put the sequence number at the end of the frame-data (footer), before I call INPKTEND to commit the last packet of the pending frame after the GPIF finished. I'm not quite sure, how to find out the position, where to put the sequence number. I mean, where the FIFO pointer stands at the moment. I should add that the FIFO is in AutoIn mode.

   

Any ideas are greatly appreciated.

   

Regards,

   

Pavol.

0 Likes
6 Replies