Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > DMA callbacks vs. Thread_Entry

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



DMA callbacks vs. Thread_Entry
Moderator:
RSKV

Post Reply
Follow this topic



DMA callbacks vs. Thread_Entry

MarSch posted on 09 Mar 2012 4:57 AM PST
Senior Member
17 Forum Posts

Hi,

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,

Markus




Re: DMA callbacks vs. Thread_Entry

aasi posted on 12 Mar 2012 11:56 PM PST
Cypress Employee
1073 Forum 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.

Regards,

Anand






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.