-
Notifications
You must be signed in to change notification settings - Fork 1
FeeLab/cyfxuvc_an75779
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Feescope Firmware for EZ-USB FX3 HD 720P DAQ board. Modifications to stock firmware made by Galen Lynch. CYPRESS SEMICONDUCTOR CORPORATION EZ-USB FX3 UVC CAMERA KIT FX3 UVC KIT FIRMWARE -------------------- 1. Introduction: ---------------- This project facilitates implementing a complete 720p Video solution using the EZ-USB FX3 device and an Image Sensor that supports YUY2 image streaming over a parallel synchronous interface. This Eclipse project contains the firmware application code that implements the Image Sensor interface and the USB Video Class (UVC) control and streaming logic. This firmware application supports streaming video in the following formats: 1. Uncompressed HD 720p (1280 * 720) resolution video at 30 frames per second (fps) over a USB 3.0 link. 2. Uncompressed VGA (640 * 480) resolution video at 15 frames per second (fps) over a USB 2.0 link. Please refer to the "AN75779: Interfacing an Image Sensor to EZ-USB FX3 in a USB video class (UVC) Framework" application note (http://www.cypress.com/?rID=62824) for a detailed design description of this application. 2. Files: --------- 1. uvc.c : Main source file implementing the UVC control and streaming logic. 2. uvc.h : Configuration parameters and constant definitions for the UVC application firmware. 3. cyfxuvcdscr.c : USB descriptors used by the UVC firmware. 4. camera_ptzcontrol.c : Extension stubs for implementation of camera controls like Pan, Tilt and Zoom. 5. camera_ptzcontrol.h : Variable and function declarations for the Pan, Tilt and Zoom control stubs. 6. sensor.c : Function placeholders and I2C driver functions to configure/control the image sensor through the I2C interface on FX3. 7. sensor.h : Interface declarations for the image sensor driver. 8. cyfxgpif2config.h : Configuration data generated by GPIF II Designer. 9. cyfxtx.c : RTOS porting layer for the EZ-USB FX3 SDK. 10. cyfx_gcc_startup.S : Startup file for the GNU ARM tool-chain. This only clears the BSS segment and then jumps to the main function. 3. Notes on Application Porting: -------------------------------- This UVC video streaming application can be ported to work with virtually any image sensor with parallel interface. The general procedure for porting the application to a particular sensor is: 1. Identify the sensor control mechanism (I2C, SPI etc.) and make appropriate changes to the sensor.c file. Code can be added to the SensorI2cBusTest() function to verify whether the sensor is accessible through the firmware. Once functionality is verified, implement the sensor initialization function SensorInit () and the resolution settings functions: SensorScaling_HD720p_30fps () and SensorScaling_VGA () or whichever resolution is required. 2. Identify the signal interface between the sensor and FX3, and update the GPIF-II state machine accordingly. You may require to update the GPIF-II initialization code in uvc.c (CyFxUvcAppGpifInit and CyFxGpifCB functions) as well. 3. Update the code for handling UVC controls like brightness, pan, tilt and zoom (uvc.c and camera_ptzcontrol.c). Please refer to the AN75779 for a detailed description on the design process. 4. Updating to a new FX3 SDK version: ------------------------------------- The cyfxtx.c and cyfx_gcc_startup.S files used here are taken from the FX3 SDK release. This version of the application makes use of FX3 SDK release version 1.3.3. When updating the application to work with a new SDK version, you need to copy the latest cyfxtx.c and cyfx_gcc_startup.S files from the new SDK into this project. You will also need to follow the instructions for porting to the new SDK that are included in the "Getting started with the FX3 SDK" document. 5. Guidelines to run UVC extension unit host application: --------------------------------------------------------- The extension unit supports Firmware version control. User can set or get firmware version. Run the uvc_extension_app_x64/x86 application. The firmware enumerates as a "FX3" device. If the FX3 device is detected, user can select 1/2 to set/get firmware version. 1. Set firmware version: By default, application sets the firmware version to 2.2 and build date to 12/20/18. Host application needs to be modified to set any other firmware version. 2. Get firmware version: Gives the current firmware version Host application is uploaded on the Cypress Community forum (Refer App note). Based on the requirements, users can update the UVC host application. If the default app note firmware is loaded, the host application fails with the following print: Function: SetGetExtensionUnit, ks_control->KsProperty(...) failed, Error code: 0x80070492 6. Tests done to check video stability: --------------------------------------- Video stability is important and a video freezing in a UVC host application is not a good sign. One might have to disconnect and re-connect the device to recover from such failures. Video may freeze when USB host is slower or Sensor/Image signal processor goes into a bad shape. The firmware has a commit buffer failure event and video timer to handle this. There will be a drop in few frames and the video re-starts. Tests done to recover from such failures: 1. Stream video for 5 hours on a Windows PC in USB2 and USB3 mode. a. PC: Lenovo modelT530 b. OS: Win 10 Version 1607 (OS Build 14393.1480) c. Application: eCAMView version 1.0.63.349 d. Hardware: CYUSB3KIT-003, CYUSB3ACC-004 and MT9M114 2. Stream video for 5 hours on a MAC PC in USB2 and USB3 mode. a. PC: Mac book b. OS: Mac OS Sierra 10.12 c. Application: Wirecast version 6.0.5 d. Hardware: CYUSB3KIT-003, CYUSB3ACC-004 and MT9M114 7. USB CV test on a Windows PC: ------------------------------- USB CV test is standard command verifier test from usb.org. This test validates the descriptor and UVC functionality. Following test were carried out and all the tests passed successfully. 1. USB 2 CV test. Application: USB2 CV version 1.5.2.3. Tests done: a. Chapter 9 b. Current Measurement c. Device summary d. UVC Descriptor e. UVC functionality f. UVC encoding unit test g. UVC H.264 test 2. USB 3 CV test. Application: USB 3 GenX CV v2.1.5.0. Tests done: a. Chapter 9 b. Current Measurement c. Device summary d. UVC Descriptor e. UVC functionality []
About
firmware for featherscope daq
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published