Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > EZ-USB multiple interface problem

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



EZ-USB multiple interface problem
Moderator:
RSKV

Post Reply
Follow this topic



EZ-USB multiple interface problem

andrewparlane posted on 19 Dec 2012 6:45 AM PST
Member
2 Forum Posts

Hi,

I'm working with a CY7C68013A-FX2LP. We started with the provided mass storage device example firmware and added a second interface that uses endpoint 1.

We use winusb to communicate over this second interface, with a custom protocol, when the device receives something on endpoint 1 it results in an I2C transaction / GPIO wiggling.

This works perfectly as it is, I plug in the dongle, it loads it's firmware, enumerates, the windows "what shall we do with this mass storage thing" pops up. I run my windows code to do a set of sample transactions over the second interface, which runs as expected.

I can also read, write and delete from the mass storage device correctly.

However I have a problem if I am doing a mass storage transfer (say writting 50MB to the dongle) and running my custom code at the same time. The first request tends to go through OK (sending 01 00), however the second request fails. Debugging has told me that the bytes I send are on the wire (02 00 0A). The EP1 OUT BUSY bit is 0 in the EP01STAT register, meaning there is data to read. However the EP1OUTBC register is 0. Meaning there is no data to read. If I ignore this and read 10 bytes anyway fromthe EP1OUTBUF buffer, I see (01 00 .....) which matches the first packet I read in.

After this request fails, about 1s later the USB reset interrupt fires and the device resets (although the mass storage transfer continues running). This doesn't always happen, but it does quite often. Also using a USB analyser I was unable to see a reset condition on the line.

So as far as I can tell, I send a request, it's defintiely on the wire, the dongle receives it and notifies that it has been received, yet the buffer and byte count registers haven't been updated.

USB descriptors: http://slexy.org/view/s21Tk2YNtj

Endpoint setup: http://slexy.org/view/s20U5otzq5

EP1 poll code: http://slexy.org/view/s21itwaq6L  (the autoptrs are commented out for debugging, the problem happens either way).

Apologies if any of the code is messy / un-needed, I've been trying not to touch stuff that works, with the aim of tidying it all up later.

Any help would be greatly appeciated, as I can't figure out where to go from here.




Re: EZ-USB multiple interface problem

andrewparlane posted on 02 Jan 2013 03:25 AM PST
Member
2 Forum Posts

 Poke, any ideas?



Re: EZ-USB multiple interface problem

Gayathri posted on 08 Jan 2013 02:43 AM PST
Cypress Employee
428 Forum Posts

 Hi,

 

Please create a tech support case at www.cypress.com -> Support -> Technical Support. One of our engineers can take a look at the issue.

 

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