USB low-full-high speed peripherals Forum Discussions
Hi ,
We are using cypress USB products .when we will connect to PC via USB and checked in Device manager these devices comes under Universal serial Bus controller category but we want as imaging Device because we interfaced with image sensor i have attached the screenshot PFA. So we wanted to change from Universal serial Bus controller category to imaging Device .Can any one help me to change ?.
Thanks Regards ,
Veerendra
Show LessHi Cypress,
for production, we need to program the EEPROM 24LC128 for Cy7c68013, it is easier to program the chip with a standalone programmer. but the programmer only loads HEX file.
the HEX file compiled from uvision can't be used for this purpose.
what we can do is use HEX file, convert to iic format, then load to 24lc128 on a developing board. then use the programmer to copy the image to a file. then burn this file to the EEPROM. is there a way to generate a HEX file can be burned in the EEPROM directly.
Thanks,
David Sun
Show LessI have an application to transmit 640x480 image sesnor data over FX2LP USB 2.0 using UVC through FPGA. I tried to find the firmware online, but no result. Then I tried to develop it myself, but it did not work .Can any one provide it ,thanks
Show LessHello!
I want to implement UVC using FX3 (trying on SuperSpeed Kit). There is no problem with UVC examples from SDK, but I have no luck to modify USBVideoClass example to work with uncompressed frames. I've downloaded specs from USB.org - USB Device Class Specifications and changed format and frame descriptors as described. I've also changed Probe and Commit control structs.
Is there any example of FRAME_UNCOMPRESSED video translation?
v4l2-ctl output:
v4l2-ctl --all -d0
Driver Info (not using libv4l2):
Driver name : uvcvideo
Card type : FX3
Bus info : usb-0000:00:14.0-5
Driver version: 4.15.18
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
Width/Height : 32/24
Pixel Format : 'BGR3'
Field : None
Bytes per Line : 96
Size Image : 2304
Colorspace : Default
Transfer Function : Default (maps to Rec. 709)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
Crop Capability Video Capture:
Bounds : Left 0, Top 0, Width 32, Height 24
Default : Left 0, Top 0, Width 32, Height 24
Pixel Aspect: 1/1
Selection: crop_default, Left 0, Top 0, Width 32, Height 24
Selection: crop_bounds, Left 0, Top 0, Width 32, Height 24
Streaming Parameters Video Capture:
Capabilities : timeperframe
Frames per second: 25.000 (25/1)
Read buffers : 0
I'm using guvcview utility to check results. And here is the log:
...
V4L2_CORE: (get_v4l2_frame) video stream must be started first
V4L2_CORE: (get_v4l2_frame) video stream must be started first
V4L2_CORE: (get_v4l2_frame) video stream must be started first
V4L2_CORE: (get_v4l2_frame) video stream must be started first
...
lsusb output:
Show Less
Bus 001 Device 047: ID 04b4:4722 Cypress Semiconductor Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.10
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2 ?
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x04b4 Cypress Semiconductor Corp.
idProduct 0x4722
bcdDevice 0.00
iManufacturer 1 Cypress
iProduct 2 FX3
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 198
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 400mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 14 Video
bFunctionSubClass 3 Video Interface Collection
bFunctionProtocol 0
iFunction 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 1 Video Control
bInterfaceProtocol 0
iInterface 0
VideoControl Interface Descriptor:
bLength 13
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdUVC 1.00
wTotalLength 80
dwClockFrequency 48.000000MHz
bInCollection 1
baInterfaceNr( 0) 1
VideoControl Interface Descriptor:
bLength 18
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0201 Camera Sensor
bAssocTerminal 0
iTerminal 0
wObjectiveFocalLengthMin 0
wObjectiveFocalLengthMax 0
wOcularFocalLength 0
bControlSize 3
bmControls 0x00000000
VideoControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 5 (PROCESSING_UNIT)
Warning: Descriptor too short
bUnitID 2
bSourceID 1
wMaxMultiplier 16384
bControlSize 3
bmControls 0x00000000
iProcessing 0
bmVideoStandards 0x1c
PAL - 625/50
SECAM - 625/50
NTSC - 625/50
VideoControl Interface Descriptor:
bLength 28
bDescriptorType 36
bDescriptorSubtype 6 (EXTENSION_UNIT)
bUnitID 3
guidExtensionCode {ffffffff-ffff-ffff-ffff-ffffffffffff}
bNumControl 0
bNrPins 1
baSourceID( 0) 2
bControlSize 3
bmControls( 0) 0x00
bmControls( 1) 0x00
bmControls( 2) 0x00
iExtension 0
VideoControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 4
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 3
iTerminal 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 8
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
VideoStreaming Interface Descriptor:
bLength 14
bDescriptorType 36
bDescriptorSubtype 1 (INPUT_HEADER)
bNumFormats 1
wTotalLength 71
bEndPointAddress 131
bmInfo 0
bTerminalLink 4
bStillCaptureMethod 1
bTriggerSupport 1
bTriggerUsage 0
bControlSize 1
bmaControls( 0) 27
VideoStreaming Interface Descriptor:
bLength 27
bDescriptorType 36
bDescriptorSubtype 4 (FORMAT_UNCOMPRESSED)
bFormatIndex 1
bNumFrameDescriptors 1
guidFormat {7deb36e4-4f52-ce11-9f53-0020af0ba770}
bBitsPerPixel 24
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags 0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 1
bmCapabilities 0x00
Still image unsupported
wWidth 32
wHeight 24
dwMinBitRate 460800
dwMaxBitRate 921600
dwMaxVideoFrameBufferSize 2304
dwDefaultFrameInterval 400000
bFrameIntervalType 1
dwFrameInterval( 0) 400000
Binary Object Store Descriptor:
bLength 5
bDescriptorType 15
wTotalLength 22
bNumDeviceCaps 2
USB 2.0 Extension Device Capability:
bLength 7
bDescriptorType 16
bDevCapabilityType 2
bmAttributes 0x00000002
Link Power Management (LPM) Supported
SuperSpeed USB Device Capability:
bLength 10
bDescriptorType 16
bDevCapabilityType 3
bmAttributes 0x00
wSpeedsSupported 0x000e
Device can operate at Full Speed (12Mbps)
Device can operate at High Speed (480Mbps)
Device can operate at SuperSpeed (5Gbps)
bFunctionalitySupport 3
Lowest fully-functional device speed is SuperSpeed (5Gbps)
bU1DevExitLat 0 micro seconds
bU2DevExitLat 0 micro seconds
Device Status: 0x0000
(Bus Powered)
Hi all,
I am trying to use CY7C68013 to grab image sensor data. But I am confused about the hardware connection between CY7C68013 and CMOS sensor.
The CMOS has following interface:
- sysclk (in)
- exposure (in)
- line_valid (out)
- frame_valid (out)
- pix_clk (out)
- Data:D0-D7 (out)
- I2C
My questions are:
1. Where can I interface the line_valid, frame_valid, pix_clk signal?
I found a case from web:
- pix_clk==>IFCLK,
- line_valid==>SLWR,
- frame_valid==>GPIO.
Is this correct? If frame_valid==>GPIO, how can this GPIO control the data transfer?
2. If I want an external camera triggering architecture, the CMOS_exposure should be connnected to CY7C68013 and then use the external_trigger signal to trigger a GPIO interrupt of CY7C68013? Or just connect the external_trigger to CMOS_exposure dirctly?
3. Is it possible to use the CLKOUT of CY7C68013 to source the CMOS_sysclk? (such as 26.66MHz)
4. Which mode is more suited for this application? Slave FIFO or GPIF?
Thanks in advance.
Best,
Zheng Rong
Show LessDear Technical Support,
as described in the PDF Chapter 3 of the Cypress CyUsb3.sys Programmer's Reference, I would like to start the Driver Resell procedure in order to have a customized driver for my hardware (based on FX2LP Cypress USB) with a dedicated .inf file. in the documentation it is written that I:"need to contact Cypress Technical Support and create a case(https://www.cypress.com/
support) with the below information to initiate the driver resell process.
1. Company details.
2. INF file with your devices VID/PIDs. "
I prepared all this info but which is the right way to contact cypress Techicanl Support and create the "case", is by this community or may I have a direct email contact with a Cypress representative?
Show LessWhen my program calls the CCyUSBDevice::Open function it takes a long time (45s or more). To anyone using the program it looks like it is frozen and unresponsive. Eventually all Cypress devices are found and things act normally.
Is there a way to speed this up?
Is there a newer version of the Cypress driver/API that is faster (I am using 3.4.7.0)?
Any help would be appreciated. Thanks.
Show LessHi All:
I am working on a USB audio device(UAC 2.0) with multichannel input MIC and stereo output speaker,the format 48KHz,16bit.
I have write a project,but it doesn't work.
Do anyone have a similar example code?
Attached is my firmware, can anyone have some suggestion?
Thanks a lot.
Update2018.08.09
1.Two Clock uint descriptors are
;; Clock Source Descriptor
db 0x08 ;; bLength
db 0x24 ;; bDescriptorType CS_Interface
db 0x0A ;; bDescriptorSubType Clock Source
db 0x10 ;; bClockID another ID is 0x11
db 0x05 ;; bmAttributes Internal Fixed Clock Locked to SOF 8000Hz
db 0x03 ;; bmControls
db 0x00 ;; bAssociatedTerminal
db 0x00 ;; iClockSource
The format descriptor is
;; FORMAT_TYPE_I descriptor
db 06H ;; bLength
db DSCR_AS_INTRFC ;; bDescriptorType CS_INTERFACE
db 02H ;; bDescriptorSubType FORMAT_TYPE
db 01H ;; bFormatType FORMAT_TYPE_I
db 04H ;; bSubSlotSize
db 18H ;; bBitResolution 24bit
SOF interrupt service function looping the input(EP2)-output(EP6) is
void ISR_Sof(void) interrupt 0
{
int i;
int count;
IOA|=0x80; //output 1 on PA.7
SYNCDELAY;
// Transfer EP6-OUT buffer to EP2-IN buffer when there is a packet in one of the EP6-OUT buffers, AND
// there is an available EP2-IN buffer. The FIFO status flags update after full packets are transferred.
// Therefore EP2-OUT "Not Empty" means a packet is available, and "EP6-IN "Not Full" means there is an
// available buffer. Using the flags this way handles any packet size and takes multiple buffering
// into account.
if(!(EP2468STAT & bmEP2EMPTY)) // Is EP2-OUT buffer not empty (has at least one packet)?
{
if(!(EP2468STAT & bmEP6FULL)) // YES: Is EP6-IN buffer not full (room for at least 1 pkt)?
{
APTR1H = MSB( &EP2FIFOBUF );
APTR1L = LSB( &EP2FIFOBUF );
AUTOPTRH2 = MSB( &EP6FIFOBUF );
AUTOPTRL2 = LSB( &EP6FIFOBUF );
count = (EP2BCH << 😎 + EP2BCL;
// loop EP2OUT buffer data to EP6IN
for( i = 0; i < 0x0200; i++ )
{
EXTAUTODAT2 = EXTAUTODAT1; // Autopointers make block transfers easy...
}
EP6BCH = 0x02; // Send the same number of bytes as received
SYNCDELAY;
EP6BCL = 0x00; // arm EP6IN
SYNCDELAY; //
EP2BCH = 0x02;
SYNCDELAY; //
EP2BCL = 0x00; // arm EP2OUT by writing byte count w/skip.
SYNCDELAY;
}
}
// for( i = 0; i < 192; i++ )
// {
// EP6FIFOBUF = i+2;
// }
// EP6BCH = 0x00;
// SYNCDELAY; //
// EP6BCL = 0xC0;
// SYNCDELAY;
IOA&=0x7F; //output 0 on PA.7
SYNCDELAY;
EZUSB_IRQ_CLEAR();
USBIRQ = bmSOF; // Clear SOF IRQ
}
Under such conditions the device driver works well, but datas on endpoint(EP6) are not narmal, like log.file1.txt over bus hound
2、After I modified the SOF interrupt service function like below
void ISR_Sof(void) interrupt 0
{
int i;
int count;
IOA|=0x80; //output 1 on PA.7
SYNCDELAY;
// Transfer EP6-OUT buffer to EP2-IN buffer when there is a packet in one of the EP6-OUT buffers, AND
// there is an available EP2-IN buffer. The FIFO status flags update after full packets are transferred.
// Therefore EP2-OUT "Not Empty" means a packet is available, and "EP6-IN "Not Full" means there is an
// available buffer. Using the flags this way handles any packet size and takes multiple buffering
// into account.
// if(!(EP2468STAT & bmEP2EMPTY)) // Is EP2-OUT buffer not empty (has at least one packet)?
// {
// if(!(EP2468STAT & bmEP6FULL)) // YES: Is EP6-IN buffer not full (room for at least 1 pkt)?
// {
// APTR1H = MSB( &EP2FIFOBUF );
// APTR1L = LSB( &EP2FIFOBUF );
// AUTOPTRH2 = MSB( &EP6FIFOBUF );
// AUTOPTRL2 = LSB( &EP6FIFOBUF );
// count = (EP2BCH << 😎 + EP2BCL;
// // loop EP2OUT buffer data to EP6IN
// for( i = 0; i < 0x0200; i++ )
// {
// EXTAUTODAT2 = EXTAUTODAT1; // Autopointers make block transfers easy...
// }
// EP6BCH = 0x02; // Send the same number of bytes as received
// SYNCDELAY;
// EP6BCL = 0x00; // arm EP6IN
// SYNCDELAY; //
// EP2BCH = 0x02;
// SYNCDELAY; //
// EP2BCL = 0x00; // arm EP2OUT by writing byte count w/skip.
// SYNCDELAY;
// }
// }
//
for( i = 0; i < 192; i++ )
{
EP6FIFOBUF = i+2;
}
EP6BCH = 0x00;
SYNCDELAY; //
EP6BCL = 0xC0;
SYNCDELAY;
IOA&=0x7F; //output 0 on PA.7
SYNCDELAY;
EZUSB_IRQ_CLEAR();
USBIRQ = bmSOF; // Clear SOF IRQ
}
I got the logfile2.txt
3、If I modify the Format FORMAT_TYPE_I descriptor:
Before:
;; FORMAT_TYPE_I descriptor
db 06H ;; bLength
db DSCR_AS_INTRFC ;; bDescriptorType CS_INTERFACE
db 02H ;; bDescriptorSubType FORMAT_TYPE
db 01H ;; bFormatType FORMAT_TYPE_I
db 04H ;; bSubSlotSize
db 18H ;; bBitResolution
After:
;; FORMAT_TYPE_I descriptor
db 06H ;; bLength
db DSCR_AS_INTRFC ;; bDescriptorType CS_INTERFACE
db 02H ;; bDescriptorSubType FORMAT_TYPE
db 01H ;; bFormatType FORMAT_TYPE_I
db 02H ;; bSubSlotSize
db 10H ;; bBitResolution
Or if I modify Clock Source Des criptor and sampling rate(48KHz)
Before:
;; Clock Source Des criptor
db 0x08 ;; bLength
db 0x24 ;; bDescriptorType CS_Interface
db 0x0A ;; bDescriptorSubType Clock Source
db 0x11 ;; bClockID
db 0x05 ;; bmAttributes Internal Fixed Clock Locked to SOF
db 0x03 ;; bmControls
db 0x00 ;; bAssociatedTerminal
db 0x00 ;; iClockSource
After:
;; Clock Source Des criptor
db 0x08 ;; bLength
db 0x24 ;; bDescriptorType CS_Interface
db 0x0A ;; bDescriptorSubType Clock Source
db 0x11 ;; bClockID
db 0x03 ;; bmAttributes Internal programmable Clock
db 0x07 ;; bmControls
db 0x00 ;; bAssociatedTerminal
db 0x00 ;; iClockSource
The device can’t work , and I got the logfile3.txt, logfile4.txt and shortcuts Modify Format.PNG、Modify Format MIC.PNG.
BRs
Shoukuan
srnt
Show LessHello everyone!
i am trying to transfer data from spartan 6 to pc and vice versa via fx2lp ( cy7c68013a). i want to use slave fifo and i have made fifoadr[1:0]=1, but i dont know how to make ifcfg[1:0]=1. can anyone explain me basic flow of interfacing of fx2 with fpga and how to configure this things?
Show LessHi,
I have a custom device built with a CY7C65211 chip, configured into I2C master mode. This device is controlled by my custom host software using the CyUSBSerial library.
Everything works just fine on Linux and Mac, but compiling the exact same host software on MSVC, I'm not getting a response from the CY7C65211.
The exact problem is in CyI2cWrite() and CyI2CRead() functions. The first time Write() is called, it returns CY_SUCCESS. All subsequent calls return CY_ERROR_REQUEST_FAILED (numeric 6). This error is documented as being returned "if the device type is not I2C", which sounds rather weird in the case. Watching on the I2C pins on a oscilloscope, no data is sent on the line, even when CyI2cWrite() has returned CY_SUCCESS.
These errors occur when I am using the Cypress-provided CyUSBSerial.dll, so I cannot step into the driver to figure out what exactly goes wrong. Despairing, I ported the Linux/Mac libcyusbserial to Windows with libusb/winusb, and with that I am seeing a timeout with the CyI2cWrite() (and nothing on the I2C pins, again). I do not know if this problem is related - but I am seeing the exact same symptoms as with the closed source driver...
Another peculiarity is that with the Cypress-provided .dll, CyLibraryInit() and CyLibraryExit() functions were not available (I was seeing linker errors). Is this intentional or another symptom of the problems I am facing? The API documentation did not mention that these two functions
would be missing from the CyUSBSerial.dll.
Any suggestions would be greatly appreciated. Or failing that, an explanation on what exactly has happened, when CyUSBSerial returns _REQUEST_FAILED error.
thank you in advance,
kalle
Show Less