USB CDC using DMA

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

cross mob
JaLe_2074191
Level 3
Level 3
First like received

I have a CY8C5868AXI-LP032 application where I transfer packets to the PC over a CDC USB interface. It works fine both with the standard API and when I enable CDC API and use that API. It works with Manual (Static Allocation) as well as DMA (Manual Buffer Management), both of these have identical performance numbers (~850us to transfer 128bytes where 10us is needed for the USBFS_LoadInEP(EP2, *txBuffer, length); to execute). When changing to DMA with Automatic Buffer Management, nothing works anymore. I have followed the setup I found in examples and the datasheet (http://www.cypress.com/file/139686/download) but I have not been able to find an example project with CDC using DMA. Any hints on what I am doing wrong? Also, calling USBFS_LoadInEP should not take long when using DMA, right?

0 Likes
2 Replies
lock attach
Attachments are accessible only for community members.
JaLe_2074191
Level 3
Level 3
First like received

Tried example 3 in AN56377 but no data is sent. I attach the project. I use the CyConsole to test. If I change to Manual (Static Allocation) or DMA (Manual Buffer Management), it works when changing to a pointer instead of using NULL in USBFS_LoadInEP(EP1, USBFS_NULL, sizeof(EP1_RAM)). Also, the Streamer application AN56377 is pointing to does not appear to work either, shows success even when no data is sent.

0 Likes
Anonymous
Not applicable

I am also observing that the generated CDC API by PSoC Creator does not work when activating DMA(Automatic Buffer Management).

It seems like the API can be patched easily. Basically:

- do _LoadInEP(epNumber, NULL, length); after _LoadInEP(epNumber, pData, length);

- do _EnableOutEP(epNumber); after _ReadOutEP(epNumber, pData, length);

0 Likes