- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The image from DDR3 is sent to FX3 P-Port,The size of image is 640*480 and i am using GpifToUsb firmware.For transferring image from DDR3 we are using Xilinx SDK.
The problem is after sending image from DDR3 ,i am trying to see data in control center using IN endpoint but the data transfer is failing with error 997.
#define CY_FX_DMA_BUF_SIZE (16384)
#define CY_FX_DMA_BUF_COUNT (7)
My first question is there any problem with configuration of size on both ends i.e..., Are they in Sync?
My second question is either the problem is with DDR3 side or FX3 side?
Regards,
Srujana.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Srujana,
The data is being transferred from PIB to SIB (storage port). If you want to check the transfer is completed, you need to check the storage port and not the USB port. When you are checking transfer in control center through an IN endpoint (USB endpont) that means you are checking the USB port and not Storage port.
To check the storage port you can check the CONS event in the DMA call back
That is why you see the error.
Regards,
Rashi
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Can you please let us know what is the application. Is it to transfer data from the P-Port to U-Port?
Error 997 occurs when no data is available in the endpoint to be read in this case.
Please find my comments for your questions:
1.The configuration of size on both ends does not matter.
2.Please enable the macro STREAMING_MANUAL in gpiftousb.c. After enabling this macro, you can obtain PROD_EVENTS. If the prod_events occur fine, then the problem is on the FX3 side. Else the problem is on the FPGA side.
Best Regards,
Jayakrishna
Jayakrishna
- 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
Hello,
Please let us know whether you are using the default project gpiftousb in the FX3 SDK.
Best Regards,
Jayakrishna
Jayakrishna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am not using the default project in the FX3 SDK.
I am using the firmware which is posted in @How to receive data (Image) coming from DDR3 to FX3
Regards,
Srujana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
This firmware is modified in such a way that the data is written from P Port to S0 Port. Please make use of the default firmware in FX3 SDK so that the data is transferred from P Port to U Port. You will also find streaming_manual inside this firmware. This project can be found in
C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples
Please try using this project.
Best Regards,
Jayakrishna
Jayakrishna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can you please let us know what is the application.
My application is to receive data from DDR3 in FX3 P-Port and send it to S0 port of FX3 and then to SD Card.
Is it to transfer data from the P-Port to U-Port?
No,i have to transfer data from P-Port to S0-Port.
Regards,
Srujana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
If the application is to transfer data from P Port to S0 port, then why do you need to read data through U Port i.e through the IN endpoint?
Best Regards,
Jayakrishna
Jayakrishna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
My application is to transfer data from P Port to S0 port only, i am using IN endpoint in Control Center to check the incoming data from DDR3 is reaching P-Port or not.Please let me know if i am wrong.
Regards,
Srujana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Srujana,
The data is being transferred from PIB to SIB (storage port). If you want to check the transfer is completed, you need to check the storage port and not the USB port. When you are checking transfer in control center through an IN endpoint (USB endpont) that means you are checking the USB port and not Storage port.
To check the storage port you can check the CONS event in the DMA call back
That is why you see the error.
Regards,
Rashi
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rashi,
I tried checking consumer event at dma callback.But,the breakpoint is not hitting there.
What should be done next to ensure that data is reaching S0-port?
Regards,
Srujana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Srujana,
1)Can you share the DMA channel configuration code ?
2) Which type DMA channel is created?
3) Do you get PROD events?
Regards,
Rashi
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please help me to sort out this issue i am struck with this issue.
1.Below is my DMA channel configuration
void PtoS_ChannelCreate ()
{
CyU3PReturnStatus_t apiRetStatus;
CyU3PDmaMultiChannelConfig_t dmaCfg;
/* Create a DMA AUTO channel for the GPIF to USB transfer. */
CyU3PMemSet ((uint8_t *)&dmaCfg, 0, sizeof (dmaCfg));
dmaCfg.size = CY_FX_DMA_BUF_SIZE;
dmaCfg.count = CY_FX_DMA_BUF_COUNT;
dmaCfg.validSckCount = 2;
dmaCfg.prodSckId [0] = (CyU3PDmaSocketId_t)CY_U3P_PIB_SOCKET_0;
dmaCfg.prodSckId [1] = (CyU3PDmaSocketId_t)CY_U3P_PIB_SOCKET_1;
dmaCfg.consSckId[0] = (CyU3PDmaSocketId_t)(CY_U3P_SIB_SOCKET_0);
dmaCfg.dmaMode = CY_U3P_DMA_MODE_BYTE;
dmaCfg.notification = CY_U3P_DMA_CB_PROD_EVENT | CY_U3P_DMA_CB_CONS_EVENT;
dmaCfg.cb = GpifToUsbDmaCallback;
dmaCfg.prodHeader = 0;
dmaCfg.prodFooter = 0;
dmaCfg.consHeader = 0;
dmaCfg.prodAvailCount = 0;
apiRetStatus = CyU3PDmaMultiChannelCreate (&glDmaChHandle, CY_U3P_DMA_TYPE_MANUAL_MANY_TO_ONE, &dmaCfg);
if (apiRetStatus != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (4, "CyU3PDmaMultiChannelCreate failed, Error code = %d\n", apiRetStatus);
CyFxAppErrorHandler(apiRetStatus);
}
/* Set DMA Channel transfer size */
apiRetStatus = CyU3PDmaMultiChannelSetXfer (&glDmaChHandle, CY_FX_GPIFTOUSB_DMA_TX_SIZE,0);
if (apiRetStatus != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (4, "CyU3PDmaMultiChannelSetXfer failed, Error code = %d\n", apiRetStatus);
CyFxAppErrorHandler(apiRetStatus);
}
}
I am attaching my firmware below.Can you please check that if there is any mistake.
Any help would be appreciated.
Regards,
Srujana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Srujana,
Are you getting the PROD events? If the data is not received by GPIF there will be no PROD events and no CONS events
Regards,
Rashi
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
When i am trying to check the PROD events and CONS events,the breakpoint is not reaching there.
Regards,
Srujana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Srujana,
Please check PROD events and CONS events using incrementing a variable or calling CyU3PDeviceReset(CyFalse); inside dma callback
If the device is not reset that means that you are not getting PROD as well as CONS events which gradually means that no data is received by GPIF
Regards,
Rashi
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rashi,
Thanks a lot for your reply.I did the steps you mentioned in previous reply and my device is not resettingi.e..., it is enumerating as StreamerExample Device after programming firmware.
Below is my DMA Callback function
void
GpifToUsbDmaCallback (
CyU3PDmaMultiChannel *chHandle,
CyU3PDmaCbType_t type,
CyU3PDmaCBInput_t *input)
{
CyU3PReturnStatus_t status = CY_U3P_SUCCESS;
CyU3PGpioSimpleSetValue (59,1);
status = CyU3PDmaMultiChannelCommitBuffer (chHandle, input->buffer_p.count, 0);
if (status != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (4, "Failed\r\n");
// CyU3PDeviceReset (0);
}
status = CyU3PSibReadWriteRequest (0, 0, 0 , 32, startAddr, 0);
startAddr += 32;
if (status == CY_U3P_SUCCESS)
{
CyU3PGpioSimpleSetValue (59,0);
}
if (type == CY_U3P_DMA_CB_PROD_EVENT)
{
if (status != CY_U3P_SUCCESS)
{
CyU3PDeviceReset(CyFalse);
rxcount++;
}
}
}
That means i am not getting any PROD Events and CONS Events right?
Regards,
Srujana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Srujana,
Yes, This means there no PROD or CONS event i.e data is not coming from the PIB block
Regards,
Rashi
Rashi