I am trying to temporarily disable my EP6 slave FIFO which is set to auto-in during data stream, and I am running into trouble no matter which approach I take. A little background: I'm grabbing data from a camera whose Line Valid (LV) signal clearly indicates when there is valid data, since it's only active when Frame Valid (FV) is also active. So, my current approach is to directly connect LV to the SLWR pin, and set SLWR polarity to active high.
If I forget about synchronizing the frame, I can acquire a whole image from the camera, but the data overlaps from one frame to the next, and the image is broken up cleanly into four sections, unless I happen to luckily make the image request at exactly the right time.
To synchronize to the frame, I would like to poll to see when FV has gone from low to high (it's active high) using a simple input pin. So the idea is to ignore all data until a request has come in and the next frame starts. I have tried two ways.
Approach 1: Normally leave EP6FIFOCFG set to 0x00, and change it temporarily to0x0C (enable AUTO IN) on command. This doesn't seem to play nicely at all, I don't get any data out when I do this. I think you're not supposed to change this after setting it once, for some reason? The documentation doesn't really say much about that though. Alternately I tried changing the VALID bit of EP6CFG, but that also did not seem to work at all. Once again, I think you're supposed to set that and leave it.
Approach 2: Leave E6 FIFO set to AUTO IN all the time, and enable the SLCS which is controlled by a free IO port on the FX2. This doesn't seem to work either; I think it messes with EP2 which I use as an OUT endpoint but with AUTO OUT off so I can just check the input data in my firmware.
I could externally AND the SLWR signal with an I/O port pin that I control myself, but that's not the cleanest solution. Is there something else I can do in software to make this work?