Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > Resetting a slave FIFO

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



Resetting a slave FIFO
Moderator:
RSKV

Post Reply
Follow this topic



Resetting a slave FIFO

bistromath posted on 07 Feb 2012 1:00 PM PST
Member
2 Forum Posts

 Is there anything special I have to do other than:

 

  FIFORESET = 0x80; SYNCDELAY;

  FIFORESET = 4; SYNCDELAY;

  FIFORESET = 8; SYNCDELAY;

  FIFORESET = 0x00; SYNCDELAY;

  EP8AUTOINLENH = (32) >> 8; SYNCDELAY;

  EP8AUTOINLENL = (32) & 0xff; SYNCDELAY;

  EP4FIFOCFG =             bmWORDWIDE;      SYNCDELAY;

  EP4FIFOCFG = bmAUTOOUT | bmWORDWIDE;      SYNCDELAY;

  EP8FIFOCFG = bmZEROLENIN |            bmWORDWIDE;      SYNCDELAY;

  EP8FIFOCFG = bmZEROLENIN | bmAUTOIN | bmWORDWIDE;      SYNCDELAY;

 

...to reset slave FIFO endpoints 4 and 8 and re-arm them? I'm trying to make my application robust against USB faults, and when I unplug the USB cable during operation, plug it back in, and reset the host program, I can't get data through endpoints 4 and 8. The above code is executed via a vendor-specific command before attempting to push data through the FIFOs. Everything works fine again after I hard reset the FX2, but after a USB fault of any kind I can't reestablish data throughput (control transactions via EP0/1 work fine), which makes me think something's not getting reset correctly. What else can I poke to clear the FX2's state properly?

 

Thanks,

Nick




Re: Resetting a slave FIFO

Gayathri posted on 09 Feb 2012 11:21 PM PST
Cypress Employee
428 Forum Posts

 Hi Nick,

 

From your post, I am able to see only two endpoints. Is it that your application is using just two endpoints (4, and 8) or is it that you have posted only that part of code? You want to reset only EP4 and EP8? 

If it is that your application is using only just these two endpoints, then it is not a valid endpoint configuration. Endpoint configuration should be one among the 12 configurations as mentioned in section 1.18 in EZ-USB TRM, which you can find at C:\Cypress\USB\doc\FX2LP after you install FX2LP DVK (from http://www.cypress.com/?rID=14321)

What is happening after USB fault? Are the transfers failing? Pleas detail the behaviour seen. Please also arm the endpoints after you do FIFORESET (you  may use OUTPKTEND/INPKTEND to skip the packets in the buffer and thus arm them).

Regards,

Gayathri






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.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20