USB low-full-high speed peripherals Forum Discussions
I want to add a 512K*16 bits fifo chip for CY7C68013's GPIF, which fifo chip of cypress is convenient to cantact with GPIF?Can you recommend one for me?
Show LessHi!Anand!
I want to download firmware hex file into the CY7C68013 througn request code 0xa0 in my VC++ programm. In each record of the hex file, it has format as:':' LL AAAA TT DD...DD CC. The LL is the data length, AAAA is the start program address of this record in CY7C68013, TT is the record type, DD...DD is the program data, CC is the check data. Now the question is which data should be extracted to download? Just only the DD...DD should be download? Should the AAAA be downloaded also?
thank you!
Show LessHi! Anand!
1,In the endpoint descriptor,when in isochronous transfer the bmAttributes's bit 3:2 defines Synchronization Type as :No Synchronization/Asynchronous/Adaptive/Synchronous, what's the differences among them? To maximrize the transfer speed, how to set it?
2,The bmAttributes's bit 5:4 defines Usage Type as :Data endpoint/Feedback endpoint/Implicit feedback Data endpoint, what's the differences among them?
Thank you!
Show LessHi,Anand!
I know why my transfer is so slow. It's the polling interval while slave fifo doesn't have a complet packet.
In my case,I used interrupt transfer mode,ARM clocks datum into slave fifo in 14Mhz,but the USB is so fast that ARM hasn't write a complete packet when USB read out all available datum,so in some time there is no data for reading, then host would wait at least 1ms to read again, but during the interval data overflowed.
So the real working time of USB is small, the transfer is in slow speed also.
Another question: what is the polling intrval of isochronous transfer? and how about the bulk trransfer?
Show LessHello!every one.i've been bothered by the slow speed transfer for several days.
I configured the CY7C68013 in slave fifo auto in mode,endpoint 2 to be a 1024 depth and quad buffer. I wrote 2KB 16-bit datum into 68013.After this operation, the host use function "BeginDataXfer","WaitForXfer"and "FinishDataXfer" to read 512 bytes 4 times with no interval. then I use "QueryPerformanceCounter" and "QueryPerformanceFrequency" in VC++ to compute the consumed time. The result is 2ms in interrupt transfer and 16 ms in bulk transfer.So the speed is 8Mbps in interrupet transfer and 1Mbps in bulk transfer.It's only the speed of full speed rather than the speed of high-speed.(the polling interval is set to be 1 in dscr.a51)
I thought the SIE may work in full-speed mode, so I try to set the HSM bit of register USBCS,but the speed doesn't change. I thought there may be time interval between four 512 bytes, so I try to read one time of the 512 bytes, but the time consumed in interrupt transfer is 0.5ms, the speed is still 8Mbps. I can't find any other idea for why the speed is so slow now
Furthermore,there are 2 other questions of the interrupt transfer:
1,I configure the endpoint 2 to be 1024 depth ,quad buffer , interrupt endpoint and 16-bit wide, the other endpoint are invalid. I wrote 2KB or more 16 datum into CY7C68013. Then I use the CyConsole.exe to read,I found there are only 2KB bytes in the endpoint2. I don't know why.
2, In the visual C++ if I read more than 512 bytes one time,then the datum after the 512th bytes are 0(the initial value of memory), that 's why I only read only 512 bytes one time.
May the problems are humble, but I can't settle them these days,I need your help. Thank you,everyone.
Show LessUsually we use begindataxfer, WaitForXfer and FinishDataXfer to transfer data. so what’s the returned value if the transfer failed? Sorry I can’t find it in the help document cyAPI.chm
Show Less1,question about function "ept->Read(&buf, bytestosend);" in control transfer
after running the code “ept->Read(&buf, bytestosend);”,Has the transfer ended?
it's vital to know the answer in continous control transfer while repeated inquring a status variable through control transfer.
2,question about large bulk transfer
in a case that a DSP transmit an image to the host by using bulk transfer, the image has 1447680 bytes,so can the bulk transfer code be executable as below:
OVERLAPPED inOvLap;
inOvLap.hEvent = CreateEvent(NULL, false, false, "CYUSB_IN");
LONG length =1447680;
USBDevice->EndPointCount();
BulkInEpt=(CCyBulkEndPoint *) USBDevice->EndPoints[1];
UCHAR *inContext = BulkInEpt->BeginDataXfer(inBuf, length, &inOvLap);
BulkInEpt->WaitForXfer(&inOvLap,1000);
BulkInEpt->FinishDataXfer(inBuf, length, &inOvLap,inContext);
CloseHandle(inOvLap.hEvent);
Show LessI am trying to write data to EP2 (configured as double buffered OUT in manual mode).
For debugging reasons, once the fx2 receives the data, I want it to commit some of the bytes to a packet and send to the host via EP1.
Relevant code: lives in a function which is regularly polled
if(!(EP2468STAT & 0x01)) { //EP2EF=0 so not empty SYNCDELAY(); EP1INBUF[0] = 0x09; EP1INBUF[1] = EP2FIFOBUF[0]; EP1INBUF[2] = EP2FIFOBUF[1]; EP1INBUF[3] = EP2FIFOBUF[2]; EP1INBUF[4] = EP2FIFOBUF[3]; EP1INBUF[5] = EP2FIFOBUF[4]; EP1INBUF[6] = EP2FIFOBUF[5]; EP1INBUF[7] = EP2FIFOBUF[6]; EP1INBUF[8] = EP2FIFOBUF[7]; EP1INBUF[9] = EP2FIFOBUF[256]; EP1INBUF[10] = EP2FIFOBUF[257]; EP1INBUF[11] = EP2FIFOBUF[258]; EP1INBUF[12] = EP2FIFOBUF[259]; EP1INBUF[13] = EP2FIFOBUF[260]; EP1INBUF[14] = EP2FIFOBUF[261]; EP1INBUF[15] = EP2FIFOBUF[262]; EP1INBUF[16] = EP2FIFOBUF[263]; EP1INBUF[17] = EP2468STAT; EP1INBC = 18; SYNCDELAY(); OUTPKTEND = 0x02; //pass on and re-arm }
The data in EP1BUF[17] returns as 0x64 for the first packet, and 0x66 for the second packet sent.
Not sure as to why 0x64 is possible, since the FIFO can't be both full and empty (am I accidently reading it here during a flag change? (This in reproducible behavior though)) Also, any subsequent attempts to read/write to *any* other endpoints timeout, as if the whole device has locked up. Any ideas? Thanks. Ali Show LessHi! I have a couple of questions about the CY7C68023 nand flash controller.
1. Can I connect a 2Gbytes Dual-Die Nand Flash? Datasheet says that it only supports 1Gbyte max. size ones... I think It refers to 1Gbytes max per Chip Enable, so if I connect a 2Gbytes dual-die one (it needs 2 CE lines) it should work correctly... am I wrong?
2. Is the spi eeprom really needed? I'd like to design a very simple USB 2.0 mass storage device (2Gbytes size) and I think I could use the default rom values...
Kind regards.
Show Less Hi,
We are using the CY7C68013A-128AXC chip and it will always become unresponsive (frozen) after transferring data for a "random" period of time.
Sometimes it will become unresponsive after 5 minutes of operation, sometimes it will become unresponsive during the 1st minute, sometimes it will run for 3 days before it becomes unresponsive.....the chip will always freeze, but we never know when!
Once the chip is frozen (unresponsive), the software on the PC cannot talk to it anymore - not even CyConsole.
We know it is not a firmware bug because if we simply request something stupid in the firmware, we simply get a timeout and the API will return a "false" in our C# code, but the chip still remains "live" - we can still see and talk to it.
Any ideas?
Thanks very much
Cheers,
David