Re: [Fx2lib-devel] Interrupting on GPIF idle
Status: Beta
Brought to you by:
mulicheng
From: -t <tg...@ya...> - 2009-05-26 18:54:19
|
Hi Eric, > From my study yesterday I believe that I can have ISR_GpifComplete() execute when a GPIF transaction goes idle. Just to be clear S7 (IDLE state) is not same as GPIF done event (compelete). If you keep it simple by popping the FIFO in only one state for each iteration through S7 then the GPIF engine itself will "auto-throttle" for you. Meaning it won't try to read from an empty FIFO or write to a full FIFO in S7 (suspending in S7 appropriately). > I would like to use this to count GPIF transactions and insert a USB packet containing this count and a marker between GPIF transactions. The 32-bit transaction count register itself maintains a "live" count. Try this first with the FIFOs in manual mode. Set TC = USB Max. Pkt. Sz. An "interesting" marker might be the USBFRAMEH/L now value. > To date I have been starting the GPIF only with GpifInit() at the start of my firmware. Is there another way to restart the GPIF after it goes idle without calling GpifInit() again? As Dennis pointed out... GpifInit() just initializes the GPIF engine (configuration registers, waveform vectors, etc.) . There are "trigger" registers for the GPIF engine, which launch (commit) the GPIF to executre a particular waveform, etc. Note: There are both MOVX version and slightly more efficient MOV (SFR) "copy of" version of these trigger registers. |