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?
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 __attribute__ ((aligned (32)));
uint8_t glEp0Buffer __attribute__ ((aligned (32)));
Do we have any Cypress tech support/engineer can help?
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.
- Madhu Sudhan
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 "
" has the source code for both host and FX3 firmware.
status = CyU3PUsbGetEP0Data (wLength, glEp0Buffer, NULL);
// if (status == CY_U3P_SUCCESS)
// status = CyFxSpiTransfer (wIndex, wLength, glEp0Buffer, CyFalse);
// for testing
status = CyU3PUsbSendEP0Data (wLength, glEp0Buffer);