Hello Arthur Hsu,
1. did you modify the sample GPIF state machine?
2.How did you say gpif always keeps first state?
GPIF statemachine continues to push data into the DMA channel whenever the thread is in the ready state.
The gpif II should be configured with the help of the gpf editor
As you may be aware the data from the gpif is received by FX3 and stored in DMA buffers before sending it to USB.
GPIF to USB example has 4 DMA buffers, each of the size 32k Bytes.Once the data transfer starts, the bytes from GPIF Start filling the 1st Buffer. Once the 1st buffer is filled then GPIF start filling the 2nd buffer. Finally at some point of time all DMA buffers filled.
Case-1: Connect only GPIF-0 pin to logic high.
Click the Transfer Data-IN button,16 KB data transfer from the first buffer.
Case-2:Connect only GPIF-2 pin to logic high.
We know that all the four buffers are filled and we received 16K of first buffer in case 1. Now half of first buffer and other three buffers are filled with the same data (01 00 00 00). There is no buffer to store the data. Hence, the state machine stops at the state (DMA_WAIT).
If we want to see the effect of GPIO -2 pin, we have to first empty the four buffer then only GPIF state machine will be able sample the data and store it.
Then do Transfer-IN to see the effect of GPIO-2. Here is the screen shot for 9th DATA IN transfer.
Your are correct
Much thanks your support