You are here

DMA Descriptor at UVC project | Cypress Semiconductor

DMA Descriptor at UVC project

Summary: 1 Reply, Latest post by scutifer on 19 Oct 2014 11:41 PM PDT
Verified Answers: 0
Last post
Log in to post new comments.
Tim0722's picture
1 post

Dear Sirs,

I am try to modify UVC project to capture some input in my project.

Where DMA Descriptor infomation exist at  the UVC Project source?

(If I modify the DMA buffer size or linked list, How can I modify it ?)

Thank you 

scutifer's picture
Cypress Employee
134 posts

 You don't need to look at the DMA descriptor to change the buffer size or count.


Just look at the CyFxUVCApplnInit() function in uvc.c. This has a call to CyU3PDmaMultiChannelCreate which creates a 2-to-1 GPIF-to-USB channel that reads in image data and sends it to the PC/host. The parameters of this channel are specified in the dmaMultiConfig structure passed to this function.


You need to just modify dmaMultiConfig.size to change the buffer size and change dmaMultiConfig.count to change how many such buffers exist. These are set the CY_FX_UVC_STREAM_BUF_SIZE and CY_FX_UVC_STREAM_BUF_COUNT macros


Also, if you change dmaMultiConfig.size (i.e CY_FX_UVC_STREAM_BUF_SIZE), you also need to tell the host that you're going to send more data per payload (here, we're setting the UVC payload to one buffer). So, change the last field of glProbeCtrl and glProbeCtrl20 from 0x00004000 (i.e 16KB) to whatever you change dmaMultiConfig.size. (the last field is the last 4 bytes of the structure that has the comment "/* No. of bytes device can rx in single payload = 16 KB */")

Log in to post new comments.