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.

MSP432E401Y: Troubleshooting Serial over USB

Part Number: MSP432E401Y

Hi,

My application implements USB as a serial port because I copied the functionality of the usbdevcserial example into it and it's been working great for me. I sent a prototype board to a customer and it worked ok for him for about a day but then suddenly stopped working so now I want to learn as much as I can about how serial over USB works so I can figure out what went wrong.

Other than 5v and ground it looks like there are 3 lines that are used to send and receive signals; target_ID, USB_P, and USB_N. What I'm most interested in finding out now are:

1. For each of the 3 signals, which ones are driven from the computer side and which ones are driven from the remote side.

2. What tells the computer that a COM Port is connected to the USB.

3. What tells the computer which COM port it is.

4. Any information about how the data is transmitted and received would also be very helpful.

Thank you.

  • Hi,

    1. For each of the 3 signals, which ones are driven from the computer side and which ones are driven from the remote side.

    I find this website with very good information about USB for beginner. Please take a look and you should find most of your questions answered in this website. https://www.beyondlogic.org/usbnutshell/usb1.shtml

    2. What tells the computer that a COM Port is connected to the USB.

    When a USB device (MSP432 running the usbdevcserial example) which supports CDC class is plug-in, it will enumerate as a serial device. The host (PC) will exchange information with the device in the so-called enumeration process to understand what type of device the host is interfacing with. Once the host knows about the device's capability , Windows will use the corresponding driver. This website has excellent description on how USB Virtual COM port work using CDC class. http://janaxelson.com/usb_virtual_com_port.htm

    3. What tells the computer which COM port it is.

    This will be assigned by Windows. If you plug in different board, it will usually result in different COM port. You will need to consult with Windows as my knowledge is limited to the MCU side. 

    4. Any information about how the data is transmitted and received would also be very helpful.

    Refer to the website answered in #1. 

  • Thank you Charles, this is very useful information. I have an earlier prototype board that also stopped communicating over the USB port so I've started troubleshooting that board assuming it's the same problem my customer is having.

    The reference says that 3v on USB_P indicates to the hub that a full speed device is connected to the port. I looked at a good device connected to the USB port and I could see 3v on USB_P. Then I looked at the bad prototype board and it did not have 3v on that pin so I thought that's probably why the hub does not see it.

    Then I followed the initialization routines to see where that voltage was getting applied hoping I could see why it wasn't being applied on the bad prototype board.

    The 3v was getting applied at line 483 of usbdcomp.c:

    MAP_USBDevConnect(USB0_BASE);

    And, using the Disassembler, it was being set by a routine branched to by the instruction

    blx r1 (where r1 is 0x0100A3D7)

    But when I tried to go to that area I got:

    0100a3d6: ???? Memory map prevented reading 0x0100A3D6 [code=0x2000]

    So I'm stuck trying to figure out why the 3v is not showing up on the bad prototype board.

    I also thought that the USB_P pin, PL6, might need to be set to allow a higher drive current but when I looked up how to do this in slau723a it said on page 1192 that PL6 and PL7 have a 4ma drive capability and that drive capability cannot be changed.

    Does anyone have any other ideas on how I should proceed to figure out why serial USB is not working on my bad prototype board?

    Thank you.

  • Hi Brad,

      Sorry, I was out of office and just got back. 

    ut when I tried to go to that area I got:

    0100a3d6: ???? Memory map prevented reading 0x0100A3D6 [code=0x2000]

    MAP_USBDevConnect will call the API stored in the ROM which starts at 0x01000000. If you use USBDevConnect instead of MAP_USBDevConnect then it will build the API as part of your application at the expense of using flash area. However, it will be easier for you to debug in C language. 

    So I'm stuck trying to figure out why the 3v is not showing up on the bad prototype board.

    I also thought that the USB_P pin, PL6, might need to be set to allow a higher drive current but when I looked up how to do this in slau723a it said on page 1192 that PL6 and PL7 have a 4ma drive capability and that drive capability cannot be changed.

     

    I don't know the reason. I will suggest you do a ABA swap test. Swap the MCU on the bad board out with a known good MCU. Will the bad board work? Swap in the suspected MCU to a good known board. Will it continue to fail? This will help troubleshoot if it is a board level or MCU level problem. 

  • Hello Charles,

    I got the prototype board back from my customer and the USB port on his board had the same symptom as my prototype board.

    I had been doing some homework in anticipation of getting his board back and I learned on page 35 of sla770 that I should put a 100 ohm resister between VBUS on the USB connector and pin PB1 on the MSP432E401Y to limit possible ESD damage.

    I replaced the MCU on his board with a new one and it started working ok again.  So now I'm assuming that the problem was caused by the fact that it didn't have the 100 ohm resister on that board and it got zapped.  My plan is to install the resister and ship it back.

    Please let me know if you can think of anything else I should be considering.

    Thank you.

  • Hi Brad,

      Please refer to section 4.3 for MSP432E design guideline where it talks about the 100ohms for differential impedance on USB bus as well as other best practices. https://www.ti.com/lit/pdf/slaa770