- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are trying to use the APIs CyU3PGpifWriteDataWords/CyU3PGpifReadDataWords using the FX3 as master and an FPGA as slave. The objective is to be able to write/read registers in the FPGA.
Note that the GPIF is set up for 32-bit synchronous with multiplexed data and address.
A simple example along with a minimal GPIF2 project would be very helpful. None of the examples in SDK 1.2.2 illustrate the use of the two APIs mentioned above.
Any help would be highly appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We dont have an example project using CyU3PGpifWriteDataWords/CyU3PGpifRead APIs.
Please create a tech support case Support-> Technical Support -> Create a case, so that one of our engineers can guide you in this.
-PRJI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please find the project that is attached to this post.
This one use the APIs CyU3PGpifWriteDataWords/CyU3PGpifReadDataWords.
I think the attached project meets your requirements.
Thanks,
sai krishna.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The example does not use multiplexed address and data bus and the API usage illustrated just writes data output.
In the absence of clear documentation, we have tried CyU3PGpifWriteDataWords/CyU3PGpifReadDataWords which seem to write data to the address associated with the thread index in multiplexed address/data mode. That is, the address is either 0,1,2,or 3.
How does one generate an arbitray address output? I need to be able to write to any arbitray 32-bit address in the external FPGA.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have several followup up questions on this example code and other GPIF2.zip code in other threads,
The reason for the questions is that I need to parse 3 words of data from a control transaction and send them as a 3 Word GPIF transmit sequence to my FPGA. So during this transaction, I do not need DMA since I will parse the Setup commands and make a call to send the GPIF data manually.
First Question: If I understand the operation correctly, once the SW is up and running, the code is basically executing the infinite loop in “SlFifoAppThread_Entry”. Within this loop, once every second we transmit the FX3 sends a single word across the GPIF bus using the function call CyU3PGpifWriteDataWords (0, CyFalse, 1, &(tmp_data[tmp_cnt]), 0xFF); Is this correct?
Second Question: This has to do with setup of the DMA. Do we still need to configure all of the USB Producer/Consumer DMA items in CyFxSlFifoApplnStart (void) . If not, what is the minimum amount of configuration that I need do to just send data out the GPIF?
Third Question: How does the thread index and socket affect these “Manual” transactions?
Ken
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Now I try compile this project.
I get error:
Description Resource Path Location Type
conflicting types for 'CyU3PDmaBufferFree' cyfxtx.c /GPIF_Async line 476 C/C++ Problem
In file cyftx.c
May be a new compiler (I use USB suite 1.3.4)
How I can change build settings ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And others:
Description Resource Path Location Type
undefined reference to `CyU3PUartInit' cyfxslfifoasync.c /SlaveFifoAsync line 107 C/C++ Problem
Description Resource Path Location Type
undefined reference to `CyU3PUartSetConfig' cyfxslfifoasync.c /SlaveFifoAsync line 124 C/C++ Problem
Description Resource Path Location Type
undefined reference to `CyU3PUartTxSetBlockXfer' cyfxslfifoasync.c /SlaveFifoAsync line 131 C/C++ Problem
But include files are presents:
#include "cyu3system.h"
#include "cyu3os.h"
#include "cyu3dma.h"
#include "cyu3error.h"
#include "cyu3usb.h"
#include "cyu3uart.h"
#include "cyfxslfifoasync.h"
#include "cyu3gpif.h"
#include "cyu3pib.h"
#include "pib_regs.h"