This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

HID; Use MSP430 USB Descriptor Tool to change USBHID_Example1

Hello TI and friends,

As I got now USBHID_Example1 up and running I tried to update descriptors.h and .c by "MSP430 USB Descriptor Tool".  I did not succeed completely. I'm able to configure it to receive commands, but not to respond the state.

My settings are:
VID: 0x2047
PID: 0x301
Clock: 8 MHz
Xtal: 4MHz
DMA: 1, 1
Self-Powerd: on
Remote Wakeup: on
Inferface: HID Interface

I noticed a difference at descriptors.h in CONFIG_STRING_INDEX 4 to 0 and  INTF_STRING_INDEX 5 to 4.

With such a modification I got the example up an running using the original example descriptor.c.

Using the file descriptor .c created by the tool I succeed to receive commands but messages send by sendData_inBackground() are not received in UsbApp.exe. The function sendData_inBackground returns 0 for success.

Replacing descriptor.c by the original delivered version then I can send and receive data.

Any sugesstion what's wrong?

Regards

Guenther

 

  • Hi Guenther,

    Guenther Klenner said:
    CONFIG_STRING_INDEX 4 to 0 and  INTF_STRING_INDEX 5 to 4

    The reason which you saw that hapening was in the configuration descriptor view  the configuration string by default is empty but may be when TI people used it they put in a string there I tested it with a random string "HID' and it went back from 0 to 4 and 4 to 5. But I doubt such a thing would cause a big problem I am using CDC whenever I need to change the MCLK I just manually change the values thinking since they are just define statements they should not effect other stuff but I may be wrong. This is what I could figure out. I am not sure why would the code fail. I will try to look into it. Good luck

    A

     

  • Hi A,

    Yes, I found this behaviour on xx_STRING_INDEX. But I did not find out why HID example works with delivered "descriptor.c" but can not send strings via USB on computed "descriptor.c".

    I learned a lot reviewing the example code like on USC and PMM settings or TLV requests.

    However the question is still open.

    Regards

    Guenther

**Attention** This is a public forum