USB low-full-high speed peripherals Forum Discussions
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 LessHello!
I am a CYPRESS chip(CY7C68013A) user,and I am developing USB products, and I have few questions below:
- 1. Can I use CYPRESS's VID in my end products?free or not?
- 2. Can I use CYPRESS's PID in my end products?free or not?
- 3. How can I get a VID & PID from CYPRESS?
This is an external 650 OHms resistor according to the documentation. What is this resistor used for in the chip? Could a wrong value lead to USB packet err
Show LessHey all,
I'm working on trying to work on improving the ability of a USB Device to recover after some error on the .NET side of things (timeout, buffer size mismatch when reading, etc). I'd like to be able to completely clear the out/in end points used in a given operation when such an error occurs. From the documentation, it sounds like the abort operation is supposed to do this. However, when I attempt to use this operation from the Cypress Control Panel it doesn't clear out the IN end point, despite "succeeding."
Is my understanding of the abort operation incorrect? Or is there something I need to do so that the abort operation will work properly? If this is not the intention of the abort command, what would be the suggested approach to implementing such a recovery mechanism?
Thanks,
Ryan
Hello,
I have the following situation:
I use the CyApi.lib to create a handling to an FX3 Chip in my C++ application.
Until now, I have use one FX3 device with on instance of my application.
Now I try to use two instance of my application with two FX3 devices with same PID. I can connect succuessfully to the FX3 device.
Also I can communicate with the different FX3 devices sequentielly perfectly.
But if I try to communicate full parallel to the FX3 devices, so I lost connection to one device.
It is possible to communicate with more as one instance of own applications to more FX3 devices with the same PID.
Feel free to ask, if you have any questions.
Best Regards
Kevin
Show Less