- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am working on a Windows console application to write/read EP0. FX3 firmware doesn't do anything other than loopback the data get from EP0.
The Windows console application EP0 Read() takes about 5-6 seconds to complete. See code below -
bXferCompleted = ctrlEpt->Write((PUCHAR)puc_buf_out, (LONG &)ul_len);
bXferCompleted = ctrlEpt->Read((PUCHAR)puc_buf_in, (LONG &)ul_len);
Is there any reason why the EP0 Read takes so long to complete?
Thanks,
Dick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
What is the buffer size (ul_len) you have set? How many bytes are you sending from FX3 to PC in a single Control transfer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Buffer size in PC 256 uint8. I am sending 4 byte data in a EP0 control transfer.
In FX3, buffer was 4096. I changed to 256, doesn't seems make any difference. FX3 just loopback 4 byte data received from EP0.
//uint8_t glEp0Buffer[4096] __attribute__ ((aligned (32)));
uint8_t glEp0Buffer[256] __attribute__ ((aligned (32)));
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Do we have any Cypress tech support/engineer can help?
Thanks,
Dick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dick Lin,
From the other post, I see that you are actually doing SPI Transfer inside the setup callback. In order to narrow down the issue, please remove the SPI Transfer part of the code and see how much time it takes.
Regards,
- Madhu Sudhan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I already comment out the SPI transition. The only thing the switch case doing is get EP0 data and send EP0 data. See below.
I have another post titled "
EP0 Read() takes 5 seconds to complete.
" has the source code for both host and FX3 firmware.
case CY_FX_RQT_SPI_FLASH_WRITE:
status = CyU3PUsbGetEP0Data (wLength, glEp0Buffer, NULL);
// if (status == CY_U3P_SUCCESS)
// {
// status = CyFxSpiTransfer (wIndex, wLength, glEp0Buffer, CyFalse);
// }
// for testing
status = CyU3PUsbSendEP0Data (wLength, glEp0Buffer);
break;