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.

A question about MSP430F5525 USB CDC mode

Other Parts Discussed in Thread: MSP430F5525

Hi,

i use msp430f5525 to implement a virtual COM port  and use C# to do an application on PC.

here is my C# code:

protected override void WndProc(ref Message m)
{
    try
    {
    if (m.Msg == WM_DEVICECHANGE)
    {
     switch (m.WParam.ToInt32())
     {
        case DBT_DEVICEARRIVAL:

        // my code.
        break;

        case DBT_DEVICEREMOVECOMPLETE: //
            // my code.

        break;
        case DBT_DEVNODES_CHANGED :

       break;

      default:
      break;
    }
}

i use mdmcpq.inf and usbser.sys as my usb driver.

i expect that when i plug in the device .  i receive DBT_DEVNODES_CHANGED for one time and followed DBT_DEVICEARRIVAL for one time.

this C# app works well when i use other devices such as USB flash drive or HL-340 usb-232 convertor.

but when use MSP430, i can only receive DBT_DEVNODES_CHANGED for two times and no more DBT_DEVICEARRIVAL.

as i know , port devices can broadcast DBT_DEVICEARRIVAL automatically and do not need to do RegisterDeviceNotification() method.

I am confused about it.

which part i should check, MSP430 code? usb driver? or C# app?

Thank you!

**Attention** This is a public forum