Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Need help with Cypress EZ-USB working as a peripheral

Status
Not open for further replies.

apakhira

Newbie level 4
Joined
Jul 31, 2011
Messages
6
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,329
Hi. I'm just starting out with USB programming. I'm using a Xilinx Virtex-4 based FPGA board, ML403 which has an integrated Cypress CY7C67300 controller.
I would want to use the controller in coprocessor mode, being controller by the PowerPC processor in the FPGA. Now looking at the Cypress datasheets I can make out that the controller is responsible for all the low level USB communication, leaving the processor to just read and write data. However I'm confused as to how to implement the device as a peripheral.
I would like to know how to send the device descriptor, how to assign device address, how to transfer control and acknowledge commands between the host and the controller, etc. None of the documents I have read discuss these properly.
I would be glad if you could give me an idea about how to go about this and point to resources for further reading.

Thanks
 

Please guys...help me out here...
 

Have you downloaded the latest development software for the Cypress CY7C67300

CY3663 CD-ROM Image v1.0

And checkout the dev kit based on the Cypress CY7C67300, it has plenty of docs and examples:

CY3663 - EZ-OTG / EZ-Host Development Kit

Here's a fairly comprehensive guide concerning the various USB roles of the Cypress CY7C67300:

USB Multi-Role Device Design By Example


These should get you started in the right direction, I have a ML403 as well, but never thought about reprogramming the Cypress CY7C67300.

Good Luck

BigDog
 

Thanks. I did download the CD ROM image, but I had overlooked the Multi Role Device document. So I'm going to look over it now. I don't have the dev kit and plan to do the project on the FPGA board, this being part of a College project that I'm part of.

One issue I definitely need to know is how to burn the firmware for the USB controller in the FPGA board.

You say you have never thought about reprogramming the Cypress CY767300. Does that mean we can have working USB applications with the controller without a firmware?
 

Thanks. I did download the CD ROM image, but I had overlooked the Multi Role Device document. So I'm going to look over it now. I don't have the dev kit and plan to do the project on the FPGA board, this being part of a College project that I'm part of.

One issue I definitely need to know is how to burn the firmware for the USB controller in the FPGA board.

You say you have never thought about reprogramming the Cypress CY767300. Does that mean we can have working USB applications with the controller without a firmware?

Much of the documentation of Cypress Dev Kit can be applied to your project. The Cypress Dev Kit uses a StrongARM as the host processor, while you'll be using the embedded PowerPC in the Virtex4FX.

For an example of how to download firmware to the Cypress CY767300:

Reference ML40x Getting Started Tutorial, pg 25, USB Demo:

This demonstration uses the processor and the USB controller chip on the ML40x board to
communicate with a USB keyboard.
The program functions by first reading the file demo.bin from the CompactFlash card.
This file contains the software for the internal microprocessor inside the USB controller
(Cypress CY7C76300). The FPGA’s processor reads this file and writes the data to the
memory inside the USB controller through its HPI port. The USB controller's internal
processor then starts and can begin implementing low-level USB commands to
communicate with the USB keyboard. Data from the USB keyboard is transferred to the
FPGA’s processor using mailbox registers over the HPI port.

ML40x Getting Started Tutorial

You will need to develop firmware for the Cypress CY7C76300 to adapt it to your application. I never pursued the issue due to the application I was developing never required a USB interface.

I've attached the USB demo firmware for the ML40x as well.

BigDog
 

Attachments

  • ml40x_usb.zip
    60.4 KB · Views: 72

Hey sorry for the late reply. I had checked out another USB Keyboard example from the Xilinx website before(xapp926 Appnote). Since you mention it I guess I can ask about a quirky problem I had with it.
The ready-for-download files work fine. But I tried using the source code in a separate project (my EDK version is 12.3, which isn't compatible with the files given for the project in EDK v9.1i). Now, when I first power on the FPGA, program the bitstream and execute the elf, it is ok. But if I stop and restart the program, the processor waits in an infinite loop, aiting for an acknowledge from the USB controlle, which never comes). This is totally weird and I have no idea why this is happening. Could you shed some light?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top