About LPC5528 USB DeviceStop function

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

About LPC5528 USB DeviceStop function

Jump to solution
686 Views
xunwan
Contributor I

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;
}

0 Kudos
1 Solution
667 Views
FelipeGarcia
NXP Employee
NXP Employee

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.

FelipeGarcia_0-1619135562042.png

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.

FelipeGarcia_1-1619135600248.png

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.

------------------------------------------------------------------------------ 

View solution in original post

0 Kudos
1 Reply
668 Views
FelipeGarcia
NXP Employee
NXP Employee

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.

FelipeGarcia_0-1619135562042.png

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.

FelipeGarcia_1-1619135600248.png

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.

------------------------------------------------------------------------------ 

0 Kudos