Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > EZ-USB FX2 how to develop a useful driver

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



EZ-USB FX2 how to develop a useful driver
Moderator:
RSKV

Post Reply
Follow this topic



EZ-USB FX2 how to develop a useful driver

ithansen posted on 20 Nov 2011 2:38 PM PST
Member
3 Forum Posts

  Hi

I am a young software developer 28 5 years as a pro. (C#.NET)

I am having a camera (Orion Starshoot Deep Space Imager) which i am trying to write a linux driver to.

Because it dos not have a linux driver.


 

I known from windows that it use the EZ-USB FX2. The installer installs it when I use the software

in windows.

If i open the cam (with a screwdriver) i can se that it has the CY7C68013A-100ACX chip.

Which i a low powered chip for commercial use.

The cam is from Optronic Technologies.

I have try to read some documentation on it but i have many unsolved questions.

I think that you clever people can answer them.

 

Here they come:

Is the EPPROM filled with firmware when the device is bought or is the firmware loaded from the PC into the device each time it is pluged in?

Is a EPPROM a solid state memory which hold the firmware, in my case the firmware from optronic?

When the documentation state that it is possible to upload and download firmware to the device how are the words used? Is the word downloading meaning from the host pc into the device, and uploading from the device to the host pc?

I have maneged through LibUsbDotNet to communicate to the device. For instance get descriptors and changing a few values. But I can se that the VID and PID is changed when i am plugin in the device into my PC (Running Linux with Virtual Box with XP with EZUSB software) If Virtualbox is closed it does not perform the enumaration, but is I start up VirtualBox with windows XP on, it does the enumeration. I think that I am only communication with the default hardware in the device not through the software firmware. 

Now I would like to know. The firmware to the cam change the cams behavier, like differents endpoint and requests, right? but where is this firmware placed are it placed in the cam (EPPROM) or is it downloaded. If it is downloaded to the device each time. Where can i find the correct firmware for my device? Which I can load in to the device before i start the normal communication through the usb command?

It will be much more easy if i could just snif the communication from windows to the device and then in linux sending the same command through lib usb. But that requere the same behavier from the cam.

Dont you think it is possible for me to actually do it? 

Where should I start...?

 

 

 

 




Re: EZ-USB FX2 how to develop a useful driver

Gayathri posted on 22 Nov 2011 09:35 PM PST
Cypress Employee
428 Forum Posts

 Hello,

 

Let me try to anwer your queries one by one :

 - As you gueesed, the word downloading meaning from the host pc into the device, and uploading from the device to the host pc.

- Now about the enumeration and where the firmware is stored: As you said, the enumeration is happening only when you open the EZ-USB s/w in Virtualbox (please correct me if I misunderstood you), we can make out that the firmware download is happening only as you open that host app. So, I don't think the fw image resides in the EEPROM. If at all, the first byte is not equal to 0xc2. In order  to know what exactly is happening I think you will need to take a trace of the USB traffic while enumeration. If you can attach that here, we can tell you exactly what is happening. What I think might be happening is that the fw download is happening over the USB, as is initiated by the host app. 

- I would like to know which EZ-USB software you metioned about. If it is any Cypress provided s/w, we can tell you what exactly is happening.

- Also, USB trace of the traffic would help you in sniffing what is happening at the bus level, and understand what are the sequence of commands/responses flowing.

 

Regards,

Gayathri



Re: EZ-USB FX2 how to develop a useful driver

ithansen posted on 25 Nov 2011 03:34 PM PST
Member
3 Forum Posts

 Hello

Thanks for the answer.

I dont know where the software exactly is from. 

I know the default installer in windows installs the EZ-USB FX2 driver. And inside the cam i can find a CYC768013A chip.

I have sniffed the usb traffic in wireshark from my linux install while virtualbox was running some of the time.

If any of this is not legal please say it. I am only doing this for private studie.

 

I have attached the captured file from wireshark

Please help me interpret what exactly is happening. I would like to do this in linux with libusb. I am a pro c#.net developer. So i just need solid help with the USB talking....

 

Short description af which packets is recieved and send and on which event.

Cam pluged in 1-43

Virtualbox started in my ubuntu 44 - 1125

Mounting the usb driver fx2 in virtualbox 1126 - 1153

Opening Astronomy software in xp (inside virtualbox) 1154 - 1155

Capturing a 1 secound image light raw file 1156 - 1345

 

Hope you understand.... And hope you can help



Re: EZ-USB FX2 how to develop a useful driver

ithansen posted on 25 Nov 2011 03:38 PM PST
Member
3 Forum Posts

 Sorry forget the file. here it is!



Re: EZ-USB FX2 how to develop a useful driver

aasi posted on 26 Nov 2011 01:39 AM PST
Cypress Employee
1090 Forum Posts

 Hi,

You're trying to reverse engineer someone elses design. I don't think it is legal without consent from the manufacturer of the design.

Regards,

Anand






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: KXP; Secondary Owner: VWA; Sunset Date: 01/01/20