Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > How to empty GPIF FIFOs from CY chip?

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



How to empty GPIF FIFOs from CY chip?
Moderator:
RSKV

Post Reply
Follow this topic



How to empty GPIF FIFOs from CY chip?

Nazila posted on 25 May 2012 12:09 PM PST
Top Contributor
55 Forum Posts

Hi,

I am using slave fifo GPIF II. I would like to be able to discard (delete) the content of the GPIF FIFOs from CYUSB3014.  I am using the "CyU3PUsbFlushEp" for both the producer and consumer. But the FIFOs stay unempty! How can I do this?

Thanks,

Nazila




Re: How to empty GPIF FIFOs from CY chip?

AssemblyRequired posted on 25 May 2012 12:16 PM PST
Top Contributor
37 Forum Posts

Hi Nazila,

Try the DMA API, i.e. CyU3PDmaChannelReset() or CyU3PDmaChannelDestroy().

Regards,
Steve



Re: How to empty GPIF FIFOs from CY chip?

Nazila posted on 25 May 2012 04:29 PM PST
Top Contributor
55 Forum Posts

Hi Steve,

Thanks, I did but it makes the Cy go to hault. I have four endpoints (two interrupts and two bulks) and I want to reset the GPIF 's FIFOs (bulk endpoints). After executing the reset channel commands, if I send a bulk data to the producer of the GPIF, then I cannot send or receive anymore data through any of the endpoints (even the interrupt ones).

Thanks,

Nazila



Re: How to empty GPIF FIFOs from CY chip?

sodafarl posted on 29 May 2012 11:52 PM PST
Top Contributor
128 Forum Posts

Nazila,

If you reset or destroy the channels you have to create them again before they can be used. Have you tried this?

Sodafarl

 



Re: How to empty GPIF FIFOs from CY chip?

Nazila posted on 29 May 2012 10:37 AM PST
Top Contributor
55 Forum Posts

Hi Sodafarl,

I used the "Start" and "Stop" functions which is being used to create all endpoints, channels,... at the begining of the downloading the firmware. Still it goes to hault!

After the "Stop" and "Start" functions I immediately send an acknowlegement through the interrupt endpoint IN. Should i put a wait before doing that?Can this be the problem?

Thanks,

Nazila



Re: How to empty GPIF FIFOs from CY chip?

sodafarl posted on 29 May 2012 02:39 PM PST
Top Contributor
128 Forum Posts

Hi Nazila,

I clear the data out of the endpoints by reseting the DMA channels then creating the DMA channels and finish by flushing the endpoints. I have a seperate function for creating the channels but I can't see anything wrong with using the 'Stop' and 'Start' functions provided in the fimrware. Maybe you can't reconfigure endpoints if they are being used - that is the only difference I can see between the 'Stop' and 'Start' function and my code for creating the DMA channels.

Sodafarl

 



Re: How to empty GPIF FIFOs from CY chip?

Nazila posted on 01 Jun 2012 12:36 PM PST
Top Contributor
55 Forum Posts

Hi,

You were right! I called the stop and start functions from one of the DMA's call back funtions. I wrote another function which only reset/destroy and then create the GPIF related endpoints/channels and now it is working! :-)

Thanks,

Nazila






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.