- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
I have a question regarding Control Endpoint usage, because USB 3.0(CYUSB3014-BZX) enable only 1/4 speed of data transmission compared USB 2.0(CY7C68013A).
In other words, USB 3.0 is slower 4times than USB2.0
Now I programmed through SDK V1.1 and following is Callback Function source coding regarding Control Endpoint.
Indeed source is only the returns against variables of error handling
At the PC application layer, I used only Read Function of CCyControlEndPoint.
CyControlEndPoint->Read((PUCHAR )pParam, len);
And firmware, I used coding as following.
/* Callback to handle the USB setup requests. */
CyBool_t
CyFxSlFifoApplnUSBSetupCB (
uint32_t setupdat0,
uint32_t setupdat1
)
{
/* Fast enumeration is used. Only class, vendor and unknown requests
* are received by this function. These are not handled in this
* application. Hence return CyFalse. */
// return CyFalse;
uint8_t attr, rqt, i2cAddr = 0;
uint8_t param[4];
uint16_t value, index, length;
CyBool_t isHandled = CyTrue;
CyU3PReturnStatus_t status = CY_U3P_SUCCESS;
uint8_t bytRet, i, read_byte;
/* Parse the control request parameters. */
attr = (uint8_t) (setupdat0 & 0x000000FF);
rqt = (uint8_t)((setupdat0 & 0x0000FF00) >> 8);
value = (uint16_t) (setupdat0 >> 16);
index = (uint16_t) (setupdat1 & 0x0000FFFF);
length = (uint16_t) (setupdat1 >> 16);
param[0] = (uint8_t) (value & 0x00FF);
param[1] = (uint8_t) ((value & 0xFF00) >> 8);
param[2] = (uint8_t) (index & 0x00FF);
param[3] = (uint8_t) ((index & 0xFF00) >> 8);
/* Fast enumeration is used. Only vendor is handled here. */
if ((attr & CY_U3P_USB_TYPE_MASK) != CY_U3P_USB_VENDOR_RQT)
{
return CyFalse;
}
switch (rqt)
{
case erGETERRCODE:
length = 1;
glEp0Buffer[0] = GET_ERRORCODE();
status = CyU3PUsbSendEP0Data(length, glEp0Buffer);
break;
Best Rgds,
Juny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Juny,
I am interested to know the way you are measuring the speed of data transmission. Please let me know.
Thanks,
sai krishna.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi RSKV
Read function of internal memory value get.
the same behavior with a thousand times, and used the average value is Test time
Performance measurement to use the "QueryPerformanceCounter function" of API
Best Rgds,
Juny