1 2 Previous Next 17 Replies Latest reply on Dec 17, 2019 9:05 PM by RashiV_61

    DDR3 to FX3

    GiSa_4520796

      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.

        • 1. Re: DDR3 to FX3
          JayakrishnaT_76

          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

          • 2. Re: DDR3 to FX3
            GiSa_4520796

            Hi,

             

            There is no streaming manual in my project.I am attaching my project below.Can you please check this and let me know.

             

            Regards,

            Srujana

            • 3. Re: DDR3 to FX3
              JayakrishnaT_76

              Hello,

               

              Please let us know whether you are using the default project gpiftousb in the FX3 SDK.

               

              Best Regards,

              Jayakrishna

              • 4. Re: DDR3 to FX3
                GiSa_4520796

                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

                • 5. Re: DDR3 to FX3
                  JayakrishnaT_76

                  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

                  • 6. Re: DDR3 to FX3
                    GiSa_4520796

                    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

                    • 7. Re: DDR3 to FX3
                      JayakrishnaT_76

                      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

                      • 8. Re: DDR3 to FX3
                        GiSa_4520796

                        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

                        • 9. Re: DDR3 to FX3
                          RashiV_61

                          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

                          • 10. Re: DDR3 to FX3
                            GiSa_4520796

                            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.

                            • 11. Re: DDR3 to FX3
                              RashiV_61

                              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

                              • 12. Re: DDR3 to FX3
                                GiSa_4520796

                                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.

                                • 13. Re: DDR3 to FX3
                                  RashiV_61

                                  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

                                  • 14. Re: DDR3 to FX3
                                    GiSa_4520796

                                    Hi,

                                     

                                    When i am trying to check the PROD events and CONS events,the breakpoint is not reaching there.

                                     

                                     

                                    Regards,

                                    Srujana

                                    1 2 Previous Next