How to transition states in GPIF II when DMA buffers empty? | Cypress Semiconductor
How to transition states in GPIF II when DMA buffers empty?
I looked at "AN84868 - Configuring an FPGA over USB Using Cypress EZ-USB FX3" but I'm trying to program an fpga from data stored in an SPI flash so that app note is of limited usefulnness.
I'm using the GPIF Designer and the state machine looks pretty straight forward. The problem I'm having is that I don't know how to transition from a state where I'm clocking out data to an idle state when the DMA channel runs out of data. The data is coming out of the SPI flash so the DMA channel will run out of data quite often. As I see it.. I need a state where the data is activly being clocked out and a second state where the chip select (CSI_B) line is asserted indicating no data during the clocks.
I don't see any way to transitioning from the "sending data state" to the "wait for more data from dma" state. The closest thing I can see from the UI is perhaps the DMA_RDY_TH0 signal indicating the DMA is ready?
Also, what happens in a state where DR_DATA is set to Data Source from Socket and the socket empties? Does the clock keep running with the last available data or does the clock just stop while the state waites for more data?
Transitioning back to the "send data state" can be done with the DMA_WM_TH0 signal I expect.
Any insight would be appreciated.