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.

TMDX5515EZDSP, CSL_USB_CdcExample_Out - can't open COM port

Other Parts Discussed in Thread: TMS320C5515

Hello. I use 5515 EZDSP with Code Composer Studio Ver. 4.1.02002 from the disk from the box and TMS320C55XXCSL-LOWPWR-2.50.00.00. I built and started CSL_USB_CdcExample_Out in Release configuration. I got C5515 CDC ACM device (COM11), but HyperTerminal says that it can't open this COM port. Can anybody help me to solve this problem?

  • Thodin,

    This connection issue is on the Windows side. Have you verified that COM11 is the correct Port within your Windows Device Manager?

    HyperTerminal cannot open this COM port because it either does not exist or it is being used by another application.

  • Hello Michael.

    No, everything is ok on the Windows side, COM port exists and not used by another application.

    I can print something from CSL_CDC_REQUEST_SET_LINE_CODING and CSL_CDC_REQUEST_GET_LINE_CODING cases of "csl_cdc.c" when HyperTerminal try to open COM port. I see that Windows makes 4 CSL_CDC_REQUEST_GET_LINE_CODING requests, then 1 CSL_CDC_REQUEST_SET_LINE_CODING request and then 2 CSL_CDC_REQUEST_GET_LINE_CODING requests. But Windows gets wrong information from DSP in answer on CSL_CDC_REQUEST_GET_LINE_CODING requests so it tells to HyperTerminal that it can't open COM port.

    I can also see that DSP gets line coding information from wrong fields in CSL_CDC_REQUEST_SET_LINE_CODING case.

     

  • Thodin,

    Were you able to install the C5515_CDC_ACM.inf file successfully?

  • Yes, I installed C5515_CDC_ACM.inf file successfully.

  • The problem is in getting SET LINE CODING request and answering on it. Sometimes, but hardly ever, DSP gets this request properly and answers to Windows properly.

    Handling of this request is in case CSL_CDC_REQUEST_SET_LINE_CODING in file "csl_cdc.c".

    I added printf of usbSetup.bmRequestType, usbSetup.bRequest, usbSetup.wValue, usbSetup.wIndex, usbSetup.wLength into this case in DSP program. Then I try to open this port on Windows as 9600, 8N1. Usually DSP prints 0xa1, 0x21, 0x0, 0x0, 0x7, but it is next request GET LINE CODING, it is not data from SET LINE CODING request. Sometimes I can see 0x80, 0x25, 0x0, 0x0, 0x6308. It is right data, 9600, 8N1, which must be after SET LINE CODING request. But it happens hardly ever so Windows can't set line coding.

     

  • I was able to get this test echoing on my system. Below are the steps I took:

    • Plug USBstick into PC & USB cable from J1 to PC.
    • Open C55 Low Power Chip Support Library v2.50.00\c55xx_csl\ccs_v4.0_examples\cslVC5505 as a CCS Project. Build it.
    • Open csl_general.h in C55 Low Power Chip Support Library v2.50.00\c55xx_csl\inc . Comment out line #157, "#define C5515_EVM". Also, verify that Line 127, "#define CHIP_C5505_C5515" is NOT commented.
    • Open C55 Low Power Chip Support Library v2.50.00\c55xx_csl\ccs_v4.0_examples\usb\CSL_USB_CdcExample as a CCS Project. Build it.
    • Create a new target config. Texas Instruments XDS100v2 USB Emulator, USBSTK5515.
    • Right click this config, click "Launch Selected Configuration".
    • Click "Connect To Target"
    • Click "Load Program", and select CDC example.out
    • Click "Run". The first time doing this will run the windows device driver wizard. Browse to the project folder & select the .inf file. This will register an additional COM device as "C5515 CDC ACM device". This is the COM# that you want to connect to using HyperTerm.
    • Your CCS Console should now display "USB SUSPEND Callback"
    • Open HyperTerminal. Connect to the corresponding COM#. 9600, 8, None, 1, None.
    • Tpying will echo back.


    I verified this with both HyperTerminal and TeraTerm. Hopefully these steps will help you pinpoint the issue. Let me know if this works.

  • I tried to do these steps. In my sourses "#define C5515_EVM" is on line 159, not 157, so maybe you have different files.

    One more problem: it works only if I build Release configuration of library and CDC test. If I build Debug configuration and run it, I get unknown USB device with  PID 0 and VID 0 on Windows instead of "C5515 CDC ACM device".

    I still can't open C5515 CDC ACM device (COM11) on my desktop computer, but if I connect J1 to laptop, I can open C5515 CDC ACM device COM port there with HyperTerminal and get echo back on typing.

    My desktop computer and laptop have the same OSs - Win XP SP3, but laptop is much slower. I think it is the reason why it works. Laptop built on Celeron M 1500MHz CPU, desktop on Core 2 Duo E8400 @ 3.00GHz. So I think if you try to connect J1 to faster computer you will have the same problems.

  • It also started to work on my desktop after I disabled USB2.0 in BIOS. So something wrong happens in CSL_CDC_REQUEST_SET_LINE_CODING case in file "csl_cdc.c" when Windows computer works fast.

  • It may be possible that we are using different versions. I am running v2.10 of the C55XCSL_LOWPOWER library. http://focus.ti.com/docs/toolsw/folders/print/sprc133.html

    Interesting that it works fine on your laptop. I did the test on a laptop, XPsp3 Core2. Its a long shot, but have you tried another terminal program, such as TeraTerm?

  • I wanted to try Teraterm, but it suppotrs only COM1-COM4, I can't assign such numbers to "C5515 CDC ACM device". Maybe my Teraterm is too old.

    But I don't think another terminal program will work with this COM port because terminal program doesn't know anything about USB. Also I wrote that HyperTerm works on my desktop when USB works slowly, in USB 1.1 mode.

  • TeraTerm will support everything HyperTerm will. Regardless if it is USB - it should show up on the list because the driver configures it as a COM device. My "c5515 CDC ACM device" was configured for COM41 on my laptop, and it worked with both TT & HT, USB2.0. I have TeraTerm v4.63, and I think 4.7 is out now. I'm unsure why you are seeing success when running USB slowly on your desktop. I will have to contact others and look into that.

     

  • I can't try new Tereterm now because I'm at home. Here is evening. I'll try it tomorrow morning.

    If you have a computer with CPU 3GHz or more somewhere near, please try to connect J1 to it.

  • I tried new TeraTerm 4.70. It opens my COM11 and echo test works with it. 

    But I analized USB exchange using Device Monitoring Studio. Setting line parameters in case of TeraTerm also goes wrong but Teraterm doesn't worry about it, so it works.

    This is wrong part of scenario: Host sends Set Line Coding request (0x20) with data "80 25 00 00 00 00 07". Device (DSP) answers with Status 0xc0000004
    (don't know what does it mean, but good status - 0x00000000). Then host sends Get Line Coding request (0x21) and gets answer with data "A1 21 00 00 00 00 07". It is wrong answer, because device has to send "80 25 00 00 00 00 07" back.

    000018: Class-Specific Request (DOWN), 11.08.2011 17:56:24.562 +0.0
    Destination: Interface, Index 0
    Reserved Bits: 0
    Request: 0x20
    Value: 0x0
    Send 0x7 bytes to the device

     80 25 00 00 00 00 07


    000019: Control Transfer (UP), 11.08.2011 17:56:24.562 +0.0. Status: 0xc0000004
    Pipe Handle: 0x899254e8

    Setup Packet
     21 20 00 00 00 00 07 00                           ! ......
    Recipient: Interface
    Request Type: Class
    Direction: Host->Device
    Request: 0x20 (Unknown)
    Value: 0x0
    Index: 0x0
    Length: 0x7

    000020: Class-Specific Request (DOWN), 11.08.2011 17:56:24.562 +0.0
    Destination: Interface, Index 0
    Reserved Bits: 0
    Request: 0x21
    Value: 0x0
    Get 0x7 bytes from the device

    000021: Control Transfer (UP), 11.08.2011 17:56:24.562 +0.0. Status: 0x00000000
    Pipe Handle: 0x899254e8

     A1 21 00 00 00 00 07                          
    Setup Packet
     A1 21 00 00 00 00 07 00   
    Recipient: Interface
    Request Type: Class
    Direction: Device->Host
    Request: 0x21 (Unknown)
    Value: 0x0
    Index: 0x0
    Length: 0x7

  • Hi Thodin,

    There are a few things can make the example code went wrong:

    1. The Code Generation Tool (CGT) version: Please make sure your CGT is 4.3.6 and above. We have seen some issues with USB on CGT 4.3.5.

    2. Make sure #define CHIP_C5505_C5515 is there.

    3. Make sure J1 is connected to your PC USB port too. In fact, J2 is for power and emulation only, while J2 is the USB connection.

    I have tested the USB CDC example under CSL 2.50 on C5515 eZdsp v2, Both Debug and Release work fine with HyperTerminal (57600baud, 8-N-1, no autoflow control) in WinXP.

    Best regards,

    Ming

  • Where I can download CGT?

  • Hi Thodin,

    You can also update your CCS 4.x to the latest release by CCS4.x --> Help --> Software Update --> Find and Install ... --> Search for new features to install --> CodeGeneration Tools Updates, Click "Finish". Choose 4.3.6. for C5500.

    Best regards,

    Ming

  • Hello. I installed the latest CGT 4.3.9. Now I can see "C5515 CDC ACM device (COM11)" when I compile test in both Debug and Release modes. But I still can't open COM11 with HyperTerminal when USB on my desktop is in USB2.0 mode. CSL_CDC_REQUEST_SET_LINE_CODING case in DSP csl_cdc.c still doesn't work properly. I think this example works on your computer with HyperTerminal because it's CPU is slower. If you have a computer with CPU E8400 @ 3.00GHz or faster, please try this test on it.

    I can also say that my EZDSP board has no "v2" postfix.

  • Hi Thodin,

    I have tried the USB CDC ACM example on a laptop with i7 CPU core which is the fastest CPU I can find around. The CDC ACM example works fine. I was using the C5515 eZdsp v1.0.

    I do found a difference between the v1.0 and v2.0. The v1.0 has two USB serial ports: one is the XDS100 Channel B (COM38 on my machine) and ther other is the USB CDC ACM (COM17 on my machine). First time, I use Hyperterminal to connect to the COM38. It does not work. When I connect to USB CDC ACM (COM17), the echo program works. The v2.0 only has one USN serial port: the USB CDC ACM (COM17 on my machine). 

    My guess is that when you connect the J2 to your PC, you got prompted for the USB driver and you used C5515_CDC_ACM.inf for the XDS100- Channel B. There is one way to confirm it. Go to the Control Panel --> System --> Hardware --> Device Manager --> Ports --> Right click on COM11 --> Properties --> Details. The Device Instance ID should show the VID_0451 and PID-9010. If it shows VID_0403 PID_A6D0, then it is the XDS100 Channel B.

    Best regards,

    Ming

  • My COM11 is J2,  VID_0451 and PID-9010. Echo works with Teraterm. But HyperTerminal can't open this COM port because DSP sends wrong answer on SET LINE CODING request.

  • Hi Thodin,

    Here are the what happened on my machine using USB Trace:

    1. Host Get_Line_Coding

    2. Device return: 80 25 00 00 00 00 08 (9600 baud, 8 bit)

    3. Host Set_Control_Line_State: 0x0 (DTE is not Present, Deactivate carrier)

    4. Device return pending

    5. Device return success

     

     

    6. Host Set_Line_Coding: 00 E1 00 00 00 00 08 (57600, 8bit)

    7. Device return pending

    8. Device return success

    9. Host Get_Line_Coding

    10. Device return: 00 E1 00 00 00 00 08 (57600, 8bit)

    11. Host Set_Control_Line_State: 0x3(DTE is Present, Activate carrier)

    12. Device return pending

    13. Device return success

    14. Data exchange starts

    The default profile for Hyperterminal is 9600, 8 bit, no parity bit, one bit stop, hardware flow control on.

    The my customized profile for Hyperterminal is 57600, 8 bit, no parity bit, one bit stop, no flow control.

    The above steps matches the default and customized profile and the device always returns the success after one pending.

     

    Is it possible you can provide the USB stack capture file using software or hardware USB analyzer?

     

    Best regards,

    Ming

  • This is a bad capture, when USB works in USB2.0 mode:

    --------------------------------------

    000098: Class-Specific Request (DOWN), 18.08.2011 10:20:01.937 +0.0
    Destination: Interface, Index 0
    Reserved Bits: 0
    Request: 0x21 (Get line coding)
    Value: 0x0
    Get 0x7 bytes from the device

    000099: Control Transfer (UP), 18.08.2011 10:20:01.937 +0.0. Status: 0x00000000
    Pipe Handle: 0x87aae588
     80 25 00 00 00 00 08
    Setup Packet
     A1 21 00 00 00 00 07 00
    Recipient: Interface
    Request Type: Class
    Direction: Device->Host
    Request: 0x21 (Get line coding)
    Value: 0x0
    Index: 0x0
    Length: 0x7

    000100: Class-Specific Request (DOWN), 18.08.2011 10:20:01.937 +0.0
    Destination: Interface, Index 0
    Reserved Bits: 0
    Request: 0x20 (Set line coding)
    Value: 0x0
    Send 0x7 bytes to the device
     80 25 00 00 00 00 08

    000101: Control Transfer (UP), 18.08.2011 10:20:01.937 +0.0. Status: 0xc0000004
    Pipe Handle: 0x87aae588
    Setup Packet
     21 20 00 00 00 00 07 00
    Recipient: Interface
    Request Type: Class
    Direction: Host->Device
    Request: 0x20 (Set line coding)
    Value: 0x0
    Index: 0x0
    Length: 0x7

    000102: Class-Specific Request (DOWN), 18.08.2011 10:20:01.937 +0.0
    Destination: Interface, Index 0
    Reserved Bits: 0
    Request: 0x21 (Get line coding)
    Value: 0x0
    Get 0x7 bytes from the device

    000103: Control Transfer (UP), 18.08.2011 10:20:01.937 +0.0. Status: 0x00000000
    Pipe Handle: 0x87aae588
     A1 21 00 00 00 00 07
    Setup Packet
     A1 21 00 00 00 00 07 00
    Recipient: Interface
    Request Type: Class
    Direction: Device->Host
    Request: 0x21 (Get line coding)
    Value: 0x0
    Index: 0x0
    Length: 0x7
    --------------------------------------

    This is a good capture, when USB works in USB1.1 mode:

    --------------------------------------

    000008: Class-Specific Request (DOWN), 18.08.2011 10:09:56.937 +0.0
    Destination: Interface, Index 0
    Reserved Bits: 0
    Request: 0x21 (Get line coding)
    Value: 0x0
    Get 0x7 bytes from the device

    000009: Control Transfer (UP), 18.08.2011 10:09:56.937 +0.0. Status: 0x00000000
    Pipe Handle: 0x896fe430
     80 25 00 00 00 00 08
    Setup Packet
     A1 21 00 00 00 00 07 00
    Recipient: Interface
    Request Type: Class
    Direction: Device->Host
    Request: 0x21 (Get line coding)
    Value: 0x0
    Index: 0x0
    Length: 0x7

    000010: Class-Specific Request (DOWN), 18.08.2011 10:09:56.937 +0.0
    Destination: Interface, Index 0
    Reserved Bits: 0
    Request: 0x20 (Set line coding)
    Value: 0x0
    Send 0x7 bytes to the device
     80 25 00 00 00 00 08

    000011: Control Transfer (UP), 18.08.2011 10:09:56.953 +0.015. Status: 0x00000000
    Pipe Handle: 0x896fe430
     80 25 00 00 00 00 08
    Setup Packet
     21 20 00 00 00 00 07 00
    Recipient: Interface
    Request Type: Class
    Direction: Host->Device
    Request: 0x20 (Set line coding)
    Value: 0x0
    Index: 0x0
    Length: 0x7

    000012: Class-Specific Request (DOWN), 18.08.2011 10:09:56.953 +0.0
    Destination: Interface, Index 0
    Reserved Bits: 0
    Request: 0x21 (Get line coding)
    Value: 0x0
    Get 0x7 bytes from the device

    000013: Control Transfer (UP), 18.08.2011 10:09:56.953 +0.0. Status: 0x00000000
    Pipe Handle: 0x896fe430
     80 25 00 00 00 00 08
    Setup Packet
     A1 21 00 00 00 00 07 00
    Recipient: Interface
    Request Type: Class
    Direction: Device->Host
    Request: 0x21 (Get line coding)
    Value: 0x0
    Index: 0x0
    Length: 0x7
    --------------------------------------

  • hi,

    thanks for giv ing some insite to run USB example.

    1. after clicking run i did not get get any message for installing driver. i use WIn XP 

    2. after running the program on console it is showing like

    "USB Interrupt Test!!
    CSL CDC Module Open Successful
    CSL CDC Module Open Successful

    USB SUSPEND Callback

    USB SUSPEND Callback
    "

    Pls advice me how to procced to test USB on TMS320C5515 ezdsp kit.

  • Manish,


    I am having the same problem as you. Did you ever find the fix?

     

    Thanks,

     

    Matt

  • Hi Matt,

    Did you connect the J2 of C5515 eZdsp to your PC USB port using a USB cable?

    Best regards,

     

    Ming 

  • Sorry for the typo! It should be J1 of the C5515 eZdsp.

    Ming

  • Ming,

    I just got it to work...don't know what I did. I just re-complied it and it worked.

    Thanks for your quick responce none-the-less.

    Best Regards,

    Matt