About LPC5528 USB DeviceStop function

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

About LPC5528 USB DeviceStop function

ソリューションへジャンプ
1,413件の閲覧回数
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 件の賞賛
返信
1 解決策
1,394件の閲覧回数
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 件の賞賛
返信
1 返信
1,395件の閲覧回数
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 件の賞賛
返信