- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone,
I am a beingger of FX3
I try sample code "GPIFtoUSB" of SDK
The project would catch GPIF one time when power on and transmit by endpoint 0x81
But GPIF always keeps first state
Question is: how to update state of GPIF continually?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Arthur Hsu,
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.
Regards,
Anil Srinivas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Regards,
Anil Srinivas.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Anil
Thanks your reply!
1. No,I don't
2. This project would catch GPIO[0]~[15],if I pull high GPIO[0] and get state as below when power on
after first catch,I pull high other pins except GPIO[0]
But the data is same as first time
That's why I guess it just catch once GPIF state
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The gpif II should be configured with the help of the gpf editor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Arthur Hsu,
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.
Regards,
Anil Srinivas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Anil
Your are correct
Much thanks your support