- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I have some questions about AN75779.
In this project,I open /*DEBUG_PRINT_FRAME_COUNT*/ like
and the debug show
.
and I can see the video by VirtualDub .
But after normal operation for some time,the debug show:
UVC: Completed 1289 frames and 0 buffers
UVC: Completed 1318 frames and 37 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Started
UVC: Completed 0 frames and 0 buffers
DMA Reset Event: Commit buffer failure
Application Stopped
Application Stopped after 40 Commit buffer failures
UVC: Completed 0 frames and 0 buffers
UVC: Completed 0 frames and 0 buffers
UVC: Completed 0 frames and 0 buffers
UVC: Completed 0 frames and 0 buffers
UVC: Completed 0 frames and 0 buffers
UVC: Completed 0 frames and 0 buffers
UVC: Completed 0 frames and 0 buffers
And no video display ......What causes this phenomenon? How can I solve this problem.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Set the CY_FX_UVC_STREAM_BUF_SIZE = 36K and CY_FX_UVC_STREAM_BUF_COUNT = 3.
Also modify the ADDR_COUNT_LIMITER and DATA_COUNT_LIMITER to (((36K-16) /2) -1 )
Then modify No. of bytes device can rx in single payload in probe control structure to 0x9000 as follows:
"0x00, 0x90, 0x00, 0x00, /* No. of bytes device can rx in single payload = 36 KB */"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please refer this Thread.
Cross check the handling of DMA RESET EVENT with AN75779 FW.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,srdr. I read this Invalid Sequence Error in Multi-Channel Commit Buffer - KBA218830
and I tried
Set a flag (say, commit_buffer_failure) in the CyFxUvcApplnDmaCallback() function,
when CyU3PDmaMultiChannelCommitBuffer() API fails to return CY_U3P_SUCCESS.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,srdr. I read this Invalid Sequence Error in Multi-Channel Commit Buffer - KBA218830
and I tried:
Set a flag (say, commit_buffer_failure) in the CyFxUvcApplnDmaCallback() function,
when CyU3PDmaMultiChannelCommitBuffer() API fails to return CY_U3P_SUCCESS........
The problem has been reduced, but sometime it will appear again.
I want to try the plan A:Increase the DMA buffer space allocated in the firmware.
But I don't know how to do it.Can you tell me what should i do.Or is there any other way to solve this problem?
Thank you in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you please share the snippet of DMA Channel creation along with MACRO definition? I will help you to modify the same.
Regards,
Sridhar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,Sridhar. There
/* 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);
if (apiRetStatus != CY_U3P_SUCCESS)
{
/* Error handling */
CyU3PDebugPrint (4, "DMA Channel Creation Failed, Error Code = %d\n", apiRetStatus);
CyFxAppErrorHandler (apiRetStatus);
}
MACRO definition:
/* UVC Video Streaming Endpoint Packet Size */
#define CY_FX_EP_BULK_VIDEO_PKT_SIZE (0x400) /* 1024 Bytes */
/* UVC Video Streaming Endpoint Packet Count */
#define CY_FX_EP_BULK_VIDEO_PKTS_COUNT (0x10) /* 16 packets (burst of 16) per DMA buffer. */
/* DMA buffer size used for video streaming. */
#define CY_FX_UVC_STREAM_BUF_SIZE (CY_FX_EP_BULK_VIDEO_PKTS_COUNT * CY_FX_EP_BULK_VIDEO_PKT_SIZE) /* 16 KB */
/* Maximum video data that can be accommodated in one DMA buffer. */
#define CY_FX_UVC_BUF_FULL_SIZE (CY_FX_UVC_STREAM_BUF_SIZE - 16)
/* Number of DMA buffers per GPIF DMA thread. */
#define CY_FX_UVC_STREAM_BUF_COUNT (4)
Here are some other information about my sensor : Resolution 1280x720@30fps, YUV2. Use the 16 bit gpif interface for the uvc project and I switched my gpif interface from 8 bit to 16 bit, change the ADDR_COUNT_LIMITER and DATA_COUNTER_LIMITER
to the value of 8183 in cyfxgpif2config.h by GPIF II Designer.
Thanks for your help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Set the CY_FX_UVC_STREAM_BUF_SIZE = 36K and CY_FX_UVC_STREAM_BUF_COUNT = 3.
Also modify the ADDR_COUNT_LIMITER and DATA_COUNT_LIMITER to (((36K-16) /2) -1 )
Then modify No. of bytes device can rx in single payload in probe control structure to 0x9000 as follows:
"0x00, 0x90, 0x00, 0x00, /* No. of bytes device can rx in single payload = 36 KB */"