Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > FX2LP FPGA interface

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



FX2LP FPGA interface
Moderator:
RSKV

Post Reply
Follow this topic



FX2LP FPGA interface

beandigital posted on 23 Feb 2013 9:41 AM PST
Top Contributor
37 Forum Posts

 I am trying to get an FPGA interface working on a FX2LP. I have used the application note AN61345 Spartan 6 design, just changing the FPGA pins to match my own. If I use the USB control centre to send some bytes to the FX2LP it reports that it worked fine. However when I try to read them back it gives the following error.

BULK IN transfer failed with Error Code:997

Can someone tell me what this means? I am a bit surprised that the example design would not just work out of the box.

Thanks

Jon




Re: FX2LP FPGA interface

PRJI posted on 24 Feb 2013 10:43 PM PST
Cypress Employee
333 Forum Posts

 Hi,

Are you using ZTEX module? Does streamer example work ? How many OUT transfers could you perform? 

Could you please probe the interface lines and let me know your observations? 

-PRJI



Re: FX2LP FPGA interface

beandigital posted on 24 Feb 2013 03:30 AM PST
Top Contributor
37 Forum Posts

 I managed to get it going. There was some setting that were not correct.



Re: FX2LP FPGA interface

PRJI posted on 24 Feb 2013 04:47 AM PST
Cypress Employee
333 Forum Posts

 



Re: FX2LP FPGA interface

richie72 posted on 01 Mar 2013 06:20 AM PST
Member
6 Forum Posts

I have the same problem.

Which settings?

I'm using a Zetex module.



Re: FX2LP FPGA interface

beandigital posted on 01 Mar 2013 10:33 AM PST
Top Contributor
37 Forum Posts

 I'm not using a Ztex module. If you post your descriptors I may be able to help.

Jon



Re: FX2LP FPGA interface

PRJI posted on 01 Mar 2013 11:25 AM PST
Cypress Employee
333 Forum Posts

Hi, 

Does streamer example work ? How many OUT transfers could you perform? 

Could you please probe the interface lines and let me know your observations? 

-PRJI



Re: FX2LP FPGA interface

NIKL posted on 04 Mar 2013 10:39 PM PST
Cypress Employee
148 Forum Posts

 Hi Richie72

Is it a Spartan6 Ztex module you are using?

 

Thanks

Nikhil



Re: FX2LP FPGA interface

richie72 posted on 04 Mar 2013 03:48 AM PST
Member
6 Forum Posts

Yes, I'm using the Spartan6 Zetex 1.11 module.

I'm trying to run the examples of the AN61345 application notes, without any changes.

@prji: I can execute Bulk Out Transfer 4 times.



Re: FX2LP FPGA interface

richie72 posted on 04 Mar 2013 03:59 AM PST
Member
6 Forum Posts

The streamer example don't work.



Re: FX2LP FPGA interface

PRJI posted on 04 Mar 2013 05:07 PM PST
Cypress Employee
333 Forum Posts

 Hi,

 Since EP2 OUT is 512 x 4 you will be able to do 2K of OUT transfer, these packets go to OUT buffer of FX2LP not to FPGA. It seems your FPGA is not configured properly or not getting proper voltage on control or data pins. Check Flag(FlagD and FlagA) status after each Out transfer, it should change after 4th transfer in case of dataloopback example. As the data transfer in the Streamer example is unidirectional I would suggest you to start debugging with this example, it would be easier to isolate issue. Probe on data lines to ensure FPGA has been configured properly and is pumping data to FX2LP.

-PRJI



Re: FX2LP FPGA interface

NIKL posted on 05 Mar 2013 05:33 AM PST
Cypress Employee
148 Forum Posts

 Richie

How are you loading the FPGA bit stream?

Are you first loading the FX2LP image and then loading the FPGA bit-stream (through JTAG) as mentioned in the App. Note?

Thanks

Nikhil



Re: FX2LP FPGA interface

NIKL posted on 05 Mar 2013 05:35 AM PST
Cypress Employee
148 Forum Posts

 Richie

Please check out the "variants" mentioned in the following site:

http://www.ztex.de/usb-fpga-1/usb-fpga-1.11.e.html

Which variant are you using?

Thanks

Nikhil



Re: FX2LP FPGA interface

richie72 posted on 05 Mar 2013 07:11 AM PST
Member
6 Forum Posts

I'm using the Ztex Module 1.11c with the LX25  with a Experimental Board 1.2. 

I’m trying to run the examples (Loop Back, Streamin) like you described it in the AN61345 paper.

Everything works fine, but the BULK IN transfer fails with the following error:

                BULK IN transfer

BULK IN transfer failed with Error Code:997

 What does that error means?

 

I have registered the ZETEX VID and PID in the CyUSB.inf.

Then downloaded the slave.hex to the RAM via USB.

After that I have downloaded the bit-streams with the XILINX Platform Cable USB II and the impact tool.

 

BULK OUT works fine, but the BULK IN transfer always fails.

In the CyConsole the FX2 appears as SLAVE FX2, is that ok?

Endpoints 2 and 6 are configured:

 

                                               <ENDPOINT>

                                                               Type="BULK"

                                                               Direction="OUT"

                                                               Address="02h"

                                                               Attributes="02h"

                                                               MaxPktSize="512"

                                                               DescriptorType="5"

                                                               DescriptorLength="7"

                                                               Interval="0"

                                               </ENDPOINT>

 

                                               <ENDPOINT>

                                                               Type="BULK"

                                                               Direction="IN"

                                                               Address="86h"

                                                               Attributes="02h"

                                                               MaxPktSize="512"

                                                               DescriptorType="5"

                                                               DescriptorLength="7"

                                                               Interval="0"

                                               </ENDPOINT>

 

In the USB Data Streamer application there is no choice for the endpoint configuration.



Re: FX2LP FPGA interface

PRJI posted on 05 Mar 2013 07:10 PM PST
Cypress Employee
333 Forum Posts

 Hi,

The error code 997 refers I/O pending for the overlapped to http://msdn.microsoft.com/en-us/library/windows/desktop/ms681388(v=vs.85).aspx

As I told you earlier the next step should be control and data line probing. Since FX2LP enumerates and performs OUT transfers successfully I suspect FPGA. Please probe the FLAG lines and confirm FPGA is getting EP6 empty flag in the streamer example.

-PRJI



Re: FX2LP FPGA interface

NIKL posted on 06 Mar 2013 12:12 AM PST
Cypress Employee
148 Forum Posts

 As PRJI suggested, please probe the lines.

You could also probe PA1 of FX2LP to check if this pin is high.

Probably the FPGA is not configured properly or might be that FPGA has gone bad.

If you have another ZTEX 1.11 module, you could try running the same examples on the other board.

 

Thanks

Nikhil



Re: FX2LP FPGA interface

NIKL posted on 12 Mar 2013 10:35 PM PST
Cypress Employee
148 Forum Posts

 Hi

I tested the bit-streams on web. There seems to be a bug in the pin-mapping.

Please create a tech-support case, if you require the projects ASAP.

In any case we will be fixing the projects latest by today or tomorrow ( the process has been initiated).

I will drop a message as soon as the correct projects are available on web.

Thanks for brinnging it to our notice.

 

Thanks

Nikhil



Re: FX2LP FPGA interface

richie72 posted on 12 Mar 2013 08:26 AM PST
Member
6 Forum Posts

Nice to hear that I'm not too stupid to run an example!

THX!



Re: FX2LP FPGA interface

NIKL posted on 14 Mar 2013 10:48 PM PST
Cypress Employee
148 Forum Posts

 Richie

can you please give me your email id?

 

Thanks

Nikhil



Re: FX2LP FPGA interface

richie72 posted on 19 Mar 2013 08:40 AM PST
Member
6 Forum Posts

With the new .bit files everything works fine!

THX



Re: FX2LP FPGA interface

NIKL posted on 19 Mar 2013 09:37 PM PST
Cypress Employee
148 Forum Posts

 Great! The documentation and the files will be uploaded on web soon!






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