flag A is not at all asserting even after the data is transmitted from FX3

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
HaMu_4778661
Level 2
Level 2

FLAG A is not at all asserting even after the data is transmitted from FX3 and FLAG C is also not asserting.

0 Likes
1 Solution

Hello Haarika,

Please refer to this KBA Debugging when DMA Flags do not Work as Expected while Reading Data from FX3 – KBA230545  and let me know if all points are followed in your application.

Also, share the modified firmware for us to check.

Regards,

Rashi

Regards,
Rashi

View solution in original post

0 Likes
7 Replies
YashwantK_46
Moderator
Moderator
Moderator
100 solutions authored 50 solutions authored 50 likes received

Hello HaMu_4778661​,

Can you let me know if you are using the default slave fifo state machine without any changes?

Can you let me know if you are using the FX3 superspeed explorer kit or your custom board and if it is connected to the FPGA using a dedicated interconnect board?

Also, can you share the appropriate traces depicting the above problem?

Also, can you let me know how the FLAG A and FLAG C are configured in the GPIF II designer in your project?

Regards,

Yashwant

0 Likes

Hi Yashwant,

Default slave fifo code was modified from bulk to Isochronous.

We are using the FX3 superspeed explorer kit.

I have attached the code for your refernce.

0 Likes

Hello,

Please add the following debug prints to track the producer and consumer events

Please share the UART debug prints when the issue is seen.

To track the DMA buffers register for CONS event

******************registering cons event for  P>Uchannel *********************

dmaCfg.dmaMode = CY_U3P_DMA_MODE_BYTE;

    /* Enabling the callback for produce event. */

    dmaCfg.notification = CY_U3P_DMA_CB_PROD_EVENT | CY_U3P_DMA_CB_CONS_EVENT;

    dmaCfg.cb = CyFxSlFifoPtoUDmaCallback;

******************registering cons event for  U>P channel *********************

dmaCfg.dmaMode = CY_U3P_DMA_MODE_BYTE;

    /* Enabling the callback for produce event. */

    dmaCfg.notification = CY_U3P_DMA_CB_PROD_EVENT | CY_U3P_DMA_CB_CONS_EVENT;

    dmaCfg.cb = CyFxSlFifoUtoPDmaCallback;

and then track the CY_U3P_DMA_CB_CONS_EVENT in the CyFxSlFifoPtoUDmaCallback and CyFxSlFifoUtoPDmaCallback  using a variable and get the UART prints in the

******************tracking CY_U3P_DMA_CB_CONS_EVENT event*********************************

void

CyFxSlFifoPtoUDmaCallback (

        CyU3PDmaChannel   *chHandle,

        CyU3PDmaCbType_t  type,

        CyU3PDmaCBInput_t *input

        )

{

........

if (type == CY_U3P_DMA_CB_CONS_EVENT)

    {

       glDMATxCount_PtoU++;

}

******************tracking CY_U3P_DMA_CB_CONS_EVENT event*********************************

void

void

CyFxSlFifoUtoPDmaCallback (

        CyU3PDmaChannel   *chHandle,

        CyU3PDmaCbType_t  type,

        CyU3PDmaCBInput_t *input

        )

{

........

if (type == CY_U3P_DMA_CB_CONS_EVENT)

    {

       glDMATxCount_UtoP++;

}

*******************************Printing the UART prints********************************

SlFifoAppThread_Entry(){

.......

CyU3PThreadSleep (1000);

        if (glIsApplnActive)

        {

            /* Print the number of buffers received so far from the USB host. */

            CyU3PDebugPrint (6, "Data tracker: buffers received: %d, buffers sent: %d, buffers_consumed_p_to_u, buffer_consumed_u_to_p : %d.\n\r",

                    glDMARxCount, glDMATxCount,glDMATxCount_PtoU, glDMATxCount_UtoP );

        }

Please enable the above debug print in the firmware to track the DMA buffer consumed and produced

Please try any one transfer i.e. either USB to PIB or  PIB to USB and probe the FLAGS (GPIO 21,22,23, 25) and share the traces.

Regards,

Rashi

Regards,
Rashi
0 Likes

Hi Rashi,

I have added debug prints and tried to transfer USB to PIB, but flags are not asserting for Isochronous and asserts for bulk mode of transfer.

FLAGS-Error.PNG

Thanks,

Haarika

0 Likes

Hello Haarika,

From the traces, it is seen that the data is sent from USB to PIB. Am I right?

If yes, the 2 DMA buffers are sent from the USB, and 2 DMA buffers consumed by the FPGA/master. so the data transfer is done successfully.

Please let me know if the data is received n the master side and how do you check the FLAG status. Can you send the probe the interface signals and share traces.

  if (glIsApplnActive)

        {

            /* Print the number of buffers received so far from the USB host. */

            CyU3PDebugPrint (6, "Data tracker: buffers received: %d, buffers sent: %d, buffers_consumed_p_to_u = %d, buffer_consumed_u_to_p : %d.\n\r",

                    glDMARxCount, glDMATxCount,glDMATxCount_PtoU, glDMATxCount_UtoP );

        }

Please try sending data from PIb to USB and add the above debug prints and let me know if this works.

Regards,

Rashi

Regards,
Rashi
0 Likes

Hi Rashi,

When I tried to send data from USB, in order to receive in FPGA the FLAG C is expected to be high, but its not.

iso_flag_sig.PNGiso_flag_wr_sig.PNGiso_flag_wr_sig_nothappening.PNG

Have you tried to test with the same code ?

Regards,

Haarika

0 Likes

Hello Haarika,

Please refer to this KBA Debugging when DMA Flags do not Work as Expected while Reading Data from FX3 – KBA230545  and let me know if all points are followed in your application.

Also, share the modified firmware for us to check.

Regards,

Rashi

Regards,
Rashi
0 Likes