FX3 UVC DMA Commit buffer failure

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

cross mob
Anonymous
Not applicable

Hi:  when i modify uvc class video project,I have met a problem that it works well at 640*480 resolution, but it not work, when i chage resolution to 1280*720. the uart print  "DMA Reset Event: Commit buffer failure".I guarantee that the place modified of  the two resolution is the same.can you help me? thanks advance!

0 Likes
1 Solution

1. Buffer space can be increased at the time of DMA Creation

/* Create a DMA Manual channel for sending the video data to the USB host. */

    dmaMultiConfig.size           = CY_FX_UVC_STREAM_BUF_SIZE;

    dmaMultiConfig.count          = CY_FX_UVC_STREAM_BUF_COUNT;

    dmaMultiConfig.validSckCount  = 2;

    dmaMultiConfig.prodSckId [0]  = (CyU3PDmaSocketId_t)CY_U3P_PIB_SOCKET_0;

    dmaMultiConfig.prodSckId [1]  = (CyU3PDmaSocketId_t)CY_U3P_PIB_SOCKET_1;

    dmaMultiConfig.consSckId [0]  = (CyU3PDmaSocketId_t)(CY_U3P_UIB_SOCKET_CONS_0 | CY_FX_EP_VIDEO_CONS_SOCKET);

    dmaMultiConfig.prodAvailCount = 0;

    dmaMultiConfig.prodHeader     = 12;                 /* 12 byte UVC header to be added. */

    dmaMultiConfig.prodFooter     = 4;                  /* 4 byte footer to compensate for the 12 byte header. */

    dmaMultiConfig.consHeader     = 0;

    dmaMultiConfig.dmaMode        = CY_U3P_DMA_MODE_BYTE;

    dmaMultiConfig.notification   = CY_U3P_DMA_CB_PROD_EVENT | CY_U3P_DMA_CB_CONS_EVENT;

    dmaMultiConfig.cb             = CyFxUvcApplnDmaCallback;

    apiRetStatus = CyU3PDmaMultiChannelCreate (&glChHandleUVCStream, CY_U3P_DMA_TYPE_MANUAL_MANY_TO_ONE,

            &dmaMultiConfig);

2. This is shown in the AN75779 App Note firmware. Refer CY_FX_UVC_DMA_RESET_EVENT in the AN75779.

View solution in original post

0 Likes
8 Replies
Keerthy_V
Moderator
Moderator
Moderator
First like given 250 sign-ins 50 solutions authored
0 Likes
Anonymous
Not applicable

Hi keaj:

     First of all thank you for your answer!I have already seen that post, but I have two places a bit puzzled!

     First: how to increase the dma buffer space!

     Second: There has the handling of the event(dma commit failure)  in UVCAppThread_Entry() function, wheth i can add this code in this event?

      Thanks advance!

0 Likes

1. Buffer space can be increased at the time of DMA Creation

/* Create a DMA Manual channel for sending the video data to the USB host. */

    dmaMultiConfig.size           = CY_FX_UVC_STREAM_BUF_SIZE;

    dmaMultiConfig.count          = CY_FX_UVC_STREAM_BUF_COUNT;

    dmaMultiConfig.validSckCount  = 2;

    dmaMultiConfig.prodSckId [0]  = (CyU3PDmaSocketId_t)CY_U3P_PIB_SOCKET_0;

    dmaMultiConfig.prodSckId [1]  = (CyU3PDmaSocketId_t)CY_U3P_PIB_SOCKET_1;

    dmaMultiConfig.consSckId [0]  = (CyU3PDmaSocketId_t)(CY_U3P_UIB_SOCKET_CONS_0 | CY_FX_EP_VIDEO_CONS_SOCKET);

    dmaMultiConfig.prodAvailCount = 0;

    dmaMultiConfig.prodHeader     = 12;                 /* 12 byte UVC header to be added. */

    dmaMultiConfig.prodFooter     = 4;                  /* 4 byte footer to compensate for the 12 byte header. */

    dmaMultiConfig.consHeader     = 0;

    dmaMultiConfig.dmaMode        = CY_U3P_DMA_MODE_BYTE;

    dmaMultiConfig.notification   = CY_U3P_DMA_CB_PROD_EVENT | CY_U3P_DMA_CB_CONS_EVENT;

    dmaMultiConfig.cb             = CyFxUvcApplnDmaCallback;

    apiRetStatus = CyU3PDmaMultiChannelCreate (&glChHandleUVCStream, CY_U3P_DMA_TYPE_MANUAL_MANY_TO_ONE,

            &dmaMultiConfig);

2. This is shown in the AN75779 App Note firmware. Refer CY_FX_UVC_DMA_RESET_EVENT in the AN75779.

0 Likes
Anonymous
Not applicable

Hi: thanks for your replay! i have met a nother problem,can you help me? below is the post , thanks advance!

thanks advance https://community.cypress.com/inbox

0 Likes
KandlaguntaR_36
Moderator
Moderator
Moderator
25 solutions authored 10 solutions authored 5 solutions authored

Hello Wang,

Please create a forum thread and share it with me.

0 Likes
Anonymous
Not applicable

Hi: i am not sure what caused the problem? thanks advance! https://community.cypress.com/thread/34034?q=Remote wake

0 Likes
Anonymous
Not applicable

Hi: i do not know  why nobody reply my problem after i created a forum? how i can get a reply timely after i created a forum

0 Likes
Anonymous
Not applicable

Hi: As shown in the figure below,Once the device receives the second SET FEATURE amcap it will be stuck

pastedImage_0.png

0 Likes