Documentation or example for USB-FS CDC with DMA

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

cross mob
DoBa_1705086
Level 3
Level 3
First like received First like given

I am seeking to enhance a current project that uses the PSOC5 full-speed USB with CDC to transfer data to a laptop.  My project currently uses the USBUART with Manual endpoint buffer management together with my own circular buffer scheme to transfer the data to the IN endpoint.  I want to change this to DMA and use the DMA completion interrupt to continue sending the next chuck of data from my circular buffer.  However I have found the USB CDC documentation to be insufficient with regard to connecting to the DMA interrupt handler.  Where might I find additional documentation or an example that uses USB CDC with DMA and DMA completion interrupt handlers?

Doug

0 Likes
1 Solution
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello Doug,

Currently we do not have a code example that shows USB CDC Class implementation along with DMA.

When using DMA with manual or Automatic buffer management you are simply using DMA to transfer data from the Buffer to USB Endpoint instead of doing it manually (using CPU). You can refer to the PSoC 5LP Audio code example that uses DMA  for data transfer. You can use that as reference to see how to setup the DMA to transfer data from the SRAM Buffer to USB Audio Endpoint (in your case it will be CDC Endpoint). Link to the code example: https://www.cypress.com/documentation/code-examples/ce95390-usb-audio-psoc-35lp

You can also refer to the Functional Description section of the USBFS datasheet that provides more information regarding DMA with Automatic and DMA with Manual Buffer management modes of USBFS.

For more information on how to configure DMA, please refer to the: AN52705 - PSoC® 3 and PSoC 5LP - Getting Started with DMA

Best Regards

Ekta

View solution in original post

0 Likes
1 Reply
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello Doug,

Currently we do not have a code example that shows USB CDC Class implementation along with DMA.

When using DMA with manual or Automatic buffer management you are simply using DMA to transfer data from the Buffer to USB Endpoint instead of doing it manually (using CPU). You can refer to the PSoC 5LP Audio code example that uses DMA  for data transfer. You can use that as reference to see how to setup the DMA to transfer data from the SRAM Buffer to USB Audio Endpoint (in your case it will be CDC Endpoint). Link to the code example: https://www.cypress.com/documentation/code-examples/ce95390-usb-audio-psoc-35lp

You can also refer to the Functional Description section of the USBFS datasheet that provides more information regarding DMA with Automatic and DMA with Manual Buffer management modes of USBFS.

For more information on how to configure DMA, please refer to the: AN52705 - PSoC® 3 and PSoC 5LP - Getting Started with DMA

Best Regards

Ekta

0 Likes