Hi,
When I use the USB1 of LPC5528, I want to turn off the device function through the USB_DeviceStop() function, but the result returned by calling the function fails. What may be the reason for this?
if (kStatus_USB_Success != USB_DeviceStop(g_composite.deviceHandle)){
USB_PDBG("USB Device Stop failed\r\n");
return kERROR_Fail;
}
Solved! Go to Solution.
Hi,
I think this is an issue with the USB_DeviceLpc3511IpControl API. I tried to replicate this by using CDC SDK example and I was able to see USB_DeviceStop returned error.
As you can see error is first initialized as kStatus_USB_Error.
Then, when entering DeviceControlStop case you only modify registers and error flag is not modify, which means that error will still have initial value when exiting this function.
Have a great day,
Felipe
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored. Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
------------------------------------------------------------------------------
Hi,
I think this is an issue with the USB_DeviceLpc3511IpControl API. I tried to replicate this by using CDC SDK example and I was able to see USB_DeviceStop returned error.
As you can see error is first initialized as kStatus_USB_Error.
Then, when entering DeviceControlStop case you only modify registers and error flag is not modify, which means that error will still have initial value when exiting this function.
Have a great day,
Felipe
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored. Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
------------------------------------------------------------------------------