- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In my usb2.0 host firmware test, I found something weird.
These are some code snippets and the resulting logs.
static void
CyFxHostXferCb (uint8_t ep, CyU3PUsbHostEpStatus_t epStatus)
{
CyU3PReturnStatus_t status = CY_U3P_SUCCESS;
CyU3PDebugPrint (4, "CyFxHostXferCb ep=0x%x epStatus=0x%x\r\n",ep,epStatus);
/* Queue the next request */
if (ep != 0)
{
status = CyU3PUsbHostEpSetXfer (ep, CY_U3P_USB_HOST_EPXFER_NORMAL, 0);
CyU3PDebugPrint (4, "CyFxHostXferCb CyU3PUsbHostEpSetXfer(0) status=0x%x\r\n",status);
}
}
/* This function initializes the USB host stack. */
void
CyFxUsbHostStart ()
{
CyU3PUsbHostConfig_t hostCfg;
CyU3PReturnStatus_t status;
hostCfg.ep0LowLevelControl = CyFalse;
hostCfg.eventCb = CyFxHostEventCb;
hostCfg.xferCb = CyFxHostXferCb;
status = CyU3PUsbHostStart (&hostCfg);
if (status != CY_U3P_SUCCESS)
{
return;
}
}
...
CyFxHostXferCb CyU3PUsbHostEpSetXfer(0) status=0x0
CyFxHostXferCb ep=0x81 epStatus=0x40
CyFxHostXferCb CyU3PUsbHostEpSetXfer(0) status=0x0
CyFxHostXferCb ep=0x81 epStatus=0x40
CyFxHostXferCb CyU3PUsbHostEpSetXfer(0) status=0x0
CyFxHostXferCb ep=0x81 epStatus=0x40
CyFxHostXferCb CyU3PUsbHostEpSetXfer(0) status=0x0
CyFxHostXferCb ep=0x81 epStatus=0x40
CyFxHostXferCb CyU3PUsbHostEpSetXfer(0) status=0x0
CyFxHostXferCb ep=0x81 epStatus=0x40
CyFxHostXferCb CyU3PUsbHostEpSetXfer(0) status=0x0
CyFxHostXferCb ep=0x81 epStatus=0x141
CyFxHostXferCb CyU3PUsbHostEpSetXfer(0) status=0x0
CyFxHostXferCb ep=0x81 epStatus=0x141
CyFxHostXferCb CyU3PUsbHostEpSetXfer(0) status=0x0
CyFxHostXferCb ep=0x81 epStatus=0x141
CyFxHostXferCb CyU3PUsbHostEpSetXfer(0) status=0x0
CyFxHostXferCb ep=0x81 epStatus=0x141
CyFxHostXferCb CyU3PUsbHostEpSetXfer(0) status=0x0
CyFxHostXferCb ep=0x81 epStatus=0x141
CyFxHostXferCb CyU3PUsbHostEpSetXfer(0) status=0x0
CyFxHostXferCb ep=0x81 epStatus=0x141
CyFxHostXferCb CyU3PUsbHostEpSetXfer(0) status=0x0
CyFxHostXferCb ep=0x81 epStatus=0x141
CyFxHostXferCb CyU3PUsbHostEpSetXfer(0) status=0x0
CyFxHostXferCb ep=0x81 epStatus=0x141
CyFxHostXferCb CyU3PUsbHostEpSetXfer(0) status=0x0
CyFxHostXferCb ep=0x81 epStatus=0x40
CyFxHostXferCb CyU3PUsbHostEpSetXfer(0) status=0x0
...
According to the following table, the last 4digits(3:0) indicate ep number.
When we look at the logs,
as we know, ep=0x81 means EP_NUM=1
CyFxHostXferCb ep=0x81 epStatus=0x141 -> This makes sense because, EP_NUM of epStatus is "1"
But in the following case,
CyFxHostXferCb ep=0x81 epStatus=0x40 -> epStatus tells EP_NUM is "0" instead of "1", which does not match with ep=0x81.
How should I interpret this discrepancy?
Regards,
Rossi
Solved! Go to Solution.
- Labels:
-
USB Superspeed Peripherals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please confirm if the behavior is same when CyU3PDebuPrint is not called in the interrupt callback
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please confirm if the behavior is same when CyU3PDebuPrint is not called in the interrupt callback
Rashi