USB VID/PID change using example code dev_hid_generic_freertos

cancel
Showing results for 
Search instead for 
Did you mean: 

USB VID/PID change using example code dev_hid_generic_freertos

Jump to solution
3,091 Views
nbgatgi
Contributor IV

First, an intro before my question ... I am using the TWR-K22F120M tower board to develop a USB device.  Using the SDK for that board including the USB stack and FreeRTOS, I have successfully tested the example code for the generic HID with FreeRTOS ("dev_hid_generic_freertos").  This required downloading and modifying code from codeproject.com per the readme.pdf (attached) in the example code folder.  Here is the link:

A USB HID Component for C# - CodeProject 

Follow the readme instructions EXACTLY and it will work.  I initially compiled the C# program for "all processors" and it would compile and run, but it would not connect to the device and echo data.  NOTE - there are code modifications required and defined in the readme.  Here is what the running program looks like except that I modified the VID/PID and default send data:

TWR-K22F120M USB HID Program.png

QUESTION:  Being brand new to the USB game, I assume the VID and PID are hard-coded somewhere in the example code.  I verified that the VID is for NXP.  Since I'm a little slower than the other kids, I could not find where this is.  We have our own VID and PID block reserved, so I would like to put it in the code.  Does anyone know where VID and PID are defined in this project?

Labels (1)
1 Solution
1,603 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Nick:

VID and PID are defined in USB device descriptor, please refer to file usb_device_descriptor.c

pastedImage_1.png

I hope it helps.

Regards

Daniel

View solution in original post

1 Reply
1,604 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Nick:

VID and PID are defined in USB device descriptor, please refer to file usb_device_descriptor.c

pastedImage_1.png

I hope it helps.

Regards

Daniel

View solution in original post