USB HID host with double interface - LPC18S37

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

USB HID host with double interface - LPC18S37

2,190 次查看
MaurizioBa
Contributor I

I've been working successfully with a LPC18S37 programmed to be a USB host for a game controller. Now I've upgraded to the game controller to a newer model and found out it provides two separate interfaces (one named "joystick" and one named "mouse"), each with its own descriptor. (The attached screenshot displays how the PC sees the device).

In order to have it work, I realized that I had to create two different USB_ClassInfo_HID_Host_t interfaces, each one initialized in EVENT_USB_Host_DeviceEnumerationComplete(). 

However, I'm not able to have the FW work with such a device: during some debug attempts, I was able to have one interface enumerated correctly for a very short period of time, but soon after it returned to a lower state. 

Can you please help me to have at least one interface working?

USB defice with two interfacesUSB defice with two interfaces

0 项奖励
回复
1 回复

2,170 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

I would suggest you refer LPCOpen demo code usbd_rom_dfu_composite included in lpcopen_3_02_lpcxpresso_xpresso1837

The example shows how to use USBD ROM stack to create a composite USB device.

To check specific problem of a composite USB project, we suggest using USB Sniffer to get all the USB communication log files. Especially get device descriptor. Check if it is correct.

 

0 项奖励
回复