Re: [Fx2lib-devel] Interrupting on GPIF idle
Status: Beta
Brought to you by:
mulicheng
From: Eric W. <er...@wi...> - 2009-05-05 16:58:21
|
Dennis Muhlestein wrote: > Eric Winsor wrote: > >> In the Cypress frameworks code (pariph.c) there are two interrupt functions: >> >> void ISR_GpifComplete(void) interrupt 0 >> { >> } >> void ISR_GpifWaveform(void) interrupt 0 >> { >> } >> >> From my study yesterday I believe that I can have ISR_GpifComplete() >> execute when a GPIF transaction goes idle. I would like to use this to >> count GPIF transactions and insert a USB packet containing this count >> and a marker between GPIF transactions. 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? >> >> >> > > GpifInit doesn't actuall start a transaction. You need to start the > single read, single write, fifo read or fifo write explicitly each time > a transaction is started. fx2lib defines all these function by the > way. There are MACROS for enabling/disabling the gpif interrupts too. > > -Dennis > OK, so all I need to do is write to the GPIFTRIG register again to restart the GPIF. Also I will need to write 0x01 to GPIFIE to enable the done interrupt and write 0x01 to GPIFIRQ when Ive serviced the interrupt. Correct? Also, what does the waveform bit (bit 1) in GPIFIE do? Eric |