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.

MSP430F5529 USB Issue

Other Parts Discussed in Thread: MSP430F5529

Hi All, 

Been working on a project for some time using bits and pieces of the USB examples from TI. I have set up my MSP430F5529 as a CDC + HID device. I have set up the microcontroller so that it takes in commands coming from a Windows 7 PC through a virtual COM port, and sends responses back to the PC, depending on which command the microcontroller has received.  However, every now and then the microcontroller will stop sending back messages through the COM port. The odd thing is that it still receives commands from the PC because the microcontroller lights up certain LEDs when given certain commands.

One thing I have discovered is that the "cdcSendDataInBackground" returns the value 29804 as an integer, but when I look at the declaration of this function, that integer means nothing. As far as I can see, this function should only return the values 0, 1, 2, or 4. 

The way this system is set up, there is the possibility of attempting to send something over the COM port from the PC while the microcontroller is attempting to send information to the PC. Not sure if the USB functions can handle this scenario...

Hoping someone on here has run into such an issue and has come up with a fix. Right now, I'm trying to replicate the problem and will try using USBCDC_abortSend operation to attempt to clear up the USB module, if that's the case...

  • Chris Edwards48 said:

    The way this system is set up, there is the possibility of attempting to send something over the COM port from the PC while the microcontroller is attempting to send information to the PC. Not sure if the USB functions can handle this scenario...

    USB module/stack cover this. PC can't send new (64 bytes) data packets to micro without ACK from micro side.

  • Alright, thanks for clearing that up. I am new to the whole USB communication world, so I don't know all the underlying mechanisms. I jumped into the msp430 USB hoping that the example functions would handle themselves appropriately, but I may be putting more trust in them than I should...

    Anyway, I'm looking for a little guidance on where I may need to look to spot the error, because I'm not even sure I know exactly where the error in my code is occurring. Is there a register I can look at that tells me "Hey your outgoing data is erroring out", or maybe a piece of USB memory? I use two USB functions, mainly: cdcReceiveDataInBuffer and cdcSendDataInBackground. The receive seems to be working fine because my board responds to commands, but the cdcSendDataInBackground doesn't seem to be sending messages to the PC. cdcSendDataInBackground returned 29804 when I did get it to error, and I've only been able to check this once so far.

**Attention** This is a public forum