LPC1766 VID/PID read(usb host)

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

LPC1766 VID/PID read(usb host)

ソリューションへジャンプ
1,700件の閲覧回数
adriancojocari
Contributor II

Hey,

I`m new here,  can someone explain me( or show me a source code :smileygrin: )how should I set my LPC1766 as a host device and read vid /pid of usb .

I allready tried example from NXP, but it didn`t help very much :smileysad:

1 解決策
1,598件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Adrian Cojocari,

    If you want to use the LPC1766 USB host mode, you can use the USB Host controller, LPC1766 support the USB host mode.

    About the sample code, you can refer to the LPCopen code for LPC1769, the code can be downloaded from this link:

http://www.nxp.com/assets/downloads/data/en/software/lpcopen_2_10_keil_iar_nxp_lpcxpresso_1769.zip 

   Open nxp_lpcxpresso_1769_lpcusblib_host_examples in folder: lpcopen_2_10_keil_iar_nxp_lpcxpresso_1769\applications\lpc17xx_40xx\iar_ewarm_projects\nxp_lpcxpresso_1769

   This code is the USB host example, you can refer to it.

   About the VID and PID, as you know, the VID and PID is defined in the device descriptor, so you just need to use USB_Host_GetDeviceDescriptor get the device decriptor, the VID is two bytes data in device_descriptor byte 8 and byte 9, PID is byte 10, byte 11.

  Take a USB device as an example:

pastedImage_2.png

   Wish it helps you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

3 返答(返信)
1,599件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Adrian Cojocari,

    If you want to use the LPC1766 USB host mode, you can use the USB Host controller, LPC1766 support the USB host mode.

    About the sample code, you can refer to the LPCopen code for LPC1769, the code can be downloaded from this link:

http://www.nxp.com/assets/downloads/data/en/software/lpcopen_2_10_keil_iar_nxp_lpcxpresso_1769.zip 

   Open nxp_lpcxpresso_1769_lpcusblib_host_examples in folder: lpcopen_2_10_keil_iar_nxp_lpcxpresso_1769\applications\lpc17xx_40xx\iar_ewarm_projects\nxp_lpcxpresso_1769

   This code is the USB host example, you can refer to it.

   About the VID and PID, as you know, the VID and PID is defined in the device descriptor, so you just need to use USB_Host_GetDeviceDescriptor get the device decriptor, the VID is two bytes data in device_descriptor byte 8 and byte 9, PID is byte 10, byte 11.

  Take a USB device as an example:

pastedImage_2.png

   Wish it helps you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,598件の閲覧回数
adriancojocari
Contributor II

Thank you very much, mvp .

0 件の賞賛
返信
1,598件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Adrian Cojocari,

    You are welcome!

    If your problem is solved, please help to mark the correct answer button to close this question.

    Thank you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信