You are here

DMA callbacks vs. Thread_Entry | Cypress Semiconductor

DMA callbacks vs. Thread_Entry

Summary: 1 Reply, Latest post by aasi on 12 Mar 2012 01:56 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
user_189577006's picture
20 posts


after having a closer look at the firmware examples, I question myself why there are different approaches regarding DMA communication.

I noticed that there are examples that do all the work in Thread_Entry, while others work within callbacks.

My application is an asynchronous device, reading data from an OUT endpoint, processing it on the ARM and writing it to an IN endpoint eventually, where the host fetches it.

To me, the callback approach looks cleaner, however I can't get it to work for the IN endpoint. The registered DMA callback is simply not called when I try to read on the EP from the host. The Control Center returns Error 997.

Is it a misunderstanding on my side that a read request on the IN endpoint should generate a callback request on the FX3 (of course only if such a callback is registered and dmaCfg.prodSckId = CY_U3P_CPU_SOCKET_PROD)?

Thanks in advance,


aasi's picture
Cypress Employee
1166 posts

Please look at page 158 for the DMA callback event types. If you don't have data in advance FX3 would respond with NAK. For a efficient bandwidth utilization it would be a good idea to have the endpoint filled with data.

In any case you should be able to CYU3P_USBEP_NAK_EVT to find the occurence of this and use it to decipher that a IN request was sent to the endpoint.



Log in to post new comments.