- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I knew that the GPIF2: IN_DATA - Register corresponds to CyU3PGpifReadDataWords().
I’m more familiar with GPIF2: IN_DATA - Socket which links to DMA channel to receive data. After the data is full, it triggers callback function in FW.
It seems that the GPIF2: IN_DATA - Register don’t use the callback mechanism. Developer should call CyU3PGpifReadDataWords() in the FW manually.
Besides, I’ve studied the GPIF_EXAMPLE1.zip in third reply.
According to the GPIF_EXAMPLE1.zip - Slave Device, it seems that the FW calls CyU3PGpifReadDataWords() every second, which is ASYNC with state machine’s IN_DATA - Register.
Q1: If CyU3PGpifReadDataWords() is called earlier than GPIF2: IN_DATA – Register, CyU3PGpifReadDataWords() will return CY_U3P_ERROR_FAILURE or else?
Q2: If GPIF2: IN_DATA – Register is executed earlier than CyU3PGpifReadDataWords(), GPIF2: IN_DATA – Register state will wait CyU3PGpifReadDataWords() before GPIF goes to next state?
Q3: what’s the different between the GPIF2: IN_DATA – Register and GPIF2: IN_DATA – Socket? Is the former slow?
Any help will be highly appreciated!
Solved! Go to Solution.
- Labels:
-
USB Superspeed Peripherals
- Tags:
- fx3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please refer to the API guide for the detailed documentation of the API CyU3PGpifReadDataWords(). As mentioned in the API guide, this function is used to read a specified number of data words into a buffer, one word at a time.
Now, for your questions, please find my comments below:
1. As mentioned in the API Guide, a A timeout period can be specified, and if any of the data words is not available within the specified period from the previous one, the operation will return with a timeout error.
2. As there is no synchronization mechanism, the state machine should move to the next state irrespective of the completion of CyU3PGpifReadDataWords().
3. Yes, the former is slow and is only recommended if the size of the data to be transferred is very less. For faster and larger DMA transfers, we recommend the use of DMA mode.
Jayakrishna