Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > Can the FX2 communicate with a webcam?

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



Can the FX2 communicate with a webcam?
Moderator:
RSKV

Post Reply
Follow this topic



Can the FX2 communicate with a webcam?

cristiansionescu posted on 03 Dec 2009 7:44 AM PST
Member
3 Forum Posts
Hello,

I am working on a project involving an Avnet Virtex-5 board with a Cypress FX2 USB controller. I'm trying to find out if it's possible to rewrite the firmware of the FX2 in order to communicate with a webcam (so another "device") and request a videostream in isochronous transfer mode.
I'm not looking for complete host functionality, just a simple way to make the FX2 ask for the videostream from the webcam and deliver it to my FPGA for processing. Is this feasible? If so, could you point me towards any documentation that might help me?
Besides this, since the board is normally behaving as a "device", and the connector is type B, do you know if the usb connector will deliver power to the webcam?

Thank you,
Christian


Re: Can the FX2 communicate with a webcam?

gopv posted on 05 Dec 2009 04:51 AM PST
Cypress Employee
20 Forum Posts
FX2LP is high speed peripheral device. It does not have the required hardware to support as a host. So it is not possible to request data from webcam through the usb port.

Regards,
Gopal

Re: Can the FX2 communicate with a webcam?

cristiansionescu posted on 11 Dec 2009 04:31 PM PST
Member
3 Forum Posts
Thank you for your input, I see there's no way around this and I can't make the 2 devices communicate. Therefore I decided to use a PC in between. I'm getting the videostream from the usb webcam using a C# simple application and I want to send it to my FPGA board with FX2 chip.
Unfortunately I got stuck when trying to send the data over to the FX2. I looked over the docs about FX2 firmware, also analysed the Screamer application provided in the developer's kit, but I still cannot figure out how to send the data.. actually how to talk to the driver (cyusb.sys). Do you have any other example or info which could help me out?

Thanks,
Christian

Re: Can the FX2 communicate with a webcam?

cristiansionescu posted on 13 Dec 2009 04:46 PM PST
Member
3 Forum Posts
I spent some more time reading the documentation for CyUSB.NET. As I see, I can use the class CyIsocEndPoint and maybe the XferData member (which sends or receives x bytes from a specified buffer) to initiate and complete a transfer. Now, I can't figure out how to send the constant stream captured from the webcam using DirectShow.
I do not know if this is possible, or how I can use this buffer to store stream and forward it to the Cypress device.
I would appreciate any code, pseudo-code or explanation which can do this (either completely redirect the stream to the cypress device, or use 2 alternative buffers to store it and send it at certain time intervals).
I believe there is an easy way to do it but C# is not my strongpoint.

Thank you,
Christian




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