USB low-full-high speed peripherals Forum Discussions
1,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
1.I try to configure endpoint 2 to be 1024 bytes,quad-buffer,bulk in mode.but after I writing more than 4096 bytes into the fifo , there are only 2048 bytes.so how can I take advantage of the whole 4KB fifo in bulk transfer with only one endpoint?
2,Can the auto in slave fifo be configured to be intrerrupt trannsfer mode?
3,On running the FIFORESET,what operation would happen to the CY7C68013? Will the FIFO are filled with 0? Or only some registers and status of the chip have been changed?How much time would this take?
Show LessThe host launches a bulk in transfer,if the endpoint doesn't have any data all the time,then after waiting some time,the host still doesn't get any data, then the host would abandon this tranfer.
now a question is how much time exactly would the host wait? and similarly how much is in the bulk out transfer and isochronous IN/OUT transfer?
thank you!
Show LessI write different datum in CY7C68013's auto-in slave fifo, but the packet content are zeros.
The problem can't be in firmware because the firmware runs well on another board. So the problem must be in the hardware.
Do you know where may the problem be in the hardware probably? Thank you all.
Show Less