I'm struggling to find a working USB HID demo for a LPCXpresso55S69.
I've looked at the dev_hid_generic_bm demo but can't manage to send or receive data from the PC.
Is there a basic tutorial on how to set it up? Like setting up the right descriptors and such?
Thanks
Hello @crabbo_babbo,
Have you tried looking at the readme pdf found in the example folder?
Path: SDK_2.8.2_LPCXpresso55S69 (1).zip\boards\lpcxpresso55s69\usb_examples\usb_device_hid_generic\bm\cm33_core0
Best Regards,
Alexis Andalon
Yes, and there is nothing useful. Not a word on how to set the device correctly (descriptors, buffers).
Actually, I wonder what the demo does, since I see no buffer sending in the main function.
Hello @crabbo_babbo,
The SDK example already has the descriptors and buffers set up, if you take a closer look at the demo there's a file called usb_device_descriptor.c that already has the descriptor.
The buffer sending the information is called in the USB callback when a kUSB_DeviceHidEventRecvResponse event is called:
Best Regards,
Alexis Andalon
Yes I've noticed, but it's not working.
The two functions always return a busy status. It seems like a common issue, as seen
And here is another problem related to HID to this (my) specific board, to which apparently there is no solution given, since the NXP support just replied "download the SDK demo".
In addition, I'd like to know why the usb_device_hid_generic demo has no USB HID drivers by default. See the screenshot below for reference.
If I add the drivers manually, the generated code conflicts with the rest of the code.
Hello @crabbo_babbo,
After downloading the example to my board and connecting it, the device should be enumerated in your computer, if you look with a sniffer you could see that this is detected as HID Class:
The readme mention the tool that it needs to be used and the changes need it but if you don't want to compile again here someone already does it.
The result should be like the next one:
As you mention, working on a USB project from scratch is a little tricky so I suggest to start from one of the USB examples that already has the configurations need it.
Best Regards,
Alexis Andalon