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.

CCS/MSP430F5529: Trouble with Making a USB HID Composite Device

Part Number: MSP430F5529
Other Parts Discussed in Thread: ENERGIA

Tool/software: Code Composer Studio

What I'm wanting to do is make a composite USB HID Keyboard/Joystick device. It will mostly use the joystick functionality, but may send some keystrokes to the PC. I'm just starting out with CCS and my first step was to take the Out of the Box Sample and include a new HID which defines a couple of types for the peripherals and the MSC. So I used the MSP Descriptor Tool by TI to generate my HIDs, and included them in the project. The first HID HID0 is still the keyboard, as is in the example.

It looks like it builds and debugs just fine, but my button presses that would normally send text (i.e. Hello World! and the ASCII Rocket) don't send anymore, the device has both Red/Green LEDs on. It gets stuck right here:

             case ST_PHYS_CONNECTED_NOENUM_SUSP:
                 // Shut down sending and enter LPM3, which is OK when USB is
                 // in suspend or disconnected.
                 bButton1Pressed = FALSE;
                 bButton2Pressed = FALSE;
                 charLeftToSend = 0;
                 bUsbSendComplete = TRUE;
                 __bis_SR_register(LPM3_bits + GIE);
                 _NOP();
                 break;

On the line for "__bis_SR_register(LPM3_bits + GIE);" I'm not sure what that's doing but it keeps repeating that line if I do a Step Over in the debugger.

Here's what I want is for some buttons that I've connected by GPIO to work as either joystick buttons or keyboard presses depending on their function, and then send the appropriate HID report. My HID Report for the keyboard on HID0 is the same as the example, I generated it with the MSP Descriptor Tool. I don't know what ST_PHYS_CONNECTED_NOENUM_SUSP means either. The documentation is quite long and I'm very sick lately and haven't been able to read through it all.

The next thing I'll need to tackle is getting data from the GPIOs, If I want to do a simple digital read from say pin 1.5, what lines of code would I need? How about analog as well?

I'm coming over from Energia as I can't do composite USB HID devices in it as I learned from a previous post.

**Attention** This is a public forum