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.

C5515 UsbStick - connecting to a PC host via USB

Other Parts Discussed in Thread: SPRC133, TMS320C5505, TMS320C5515

Has anyone had any success using the USB port (not the one for emulation) to transfer data to a PC host?  I believe this would be of general interest to a lot of people, and the facilities seem to be available, but several steps are involved.  The first 6 steps are straightforward but beyond that I've run into problems.  Here are the steps:

1) Download the CSL (low-power version) from here:   http://focus.ti.com/docs/toolsw/folders/print/sprc133.html

2) Once you've installed it, you'll find a doc directory which has documentation for all of the examples in the CSL library.  Following the docs for the USB port, you must then:

3)  Contact your nearest TI sales rep and obtain a host side program called dm350_diag.exe.  It has its own set of instructions for installation which you must follow.

4)  Download a PC USB host driver (called "WinDriver") from www.jungo.com.  The current version available is 10.2.  It's available as a 30-day trial.

5)  Import the the entire CSL library project in CCS V4 and then select example that you want to be the active sub-project , i.e. CSL_USB_PollExample_Out.

6) Build and run the target program and connect the USB cable to your host pc.

7) The CSL example documentation now instructs you to: "Open the Windriver driver wizard and install the inf file for the USB device (Only when running for first time)".  But when I try to do this, the WinDriver wizard doesn't seem to give me an option to install any .inf file.  I presume it's the .inf file that came with the dm350_diag.exe package.  The driver wizard let's you create a project file based on some existing installed items, but the TI USB connection does not show up on this list.  This crucial step is necessary to run step 8, which is to run dm350_diag and observe a trace of the communication between target and host via the USB.

I've tried this on a Windows XP and Vista systems (both 32-bit), but have had no luck.  Has anyone out there had any success with this?

 

Thanks, Ed

 

  • Hi,

    Your steps look correct.

    Yes, it's working with me. I'm using XP. We are under processing to release new CSL release and USB testing program (for PC application) will be included.

     

    Regards,

    Hyun

  • Ok, thanks for the verification that I'm doing the right thing.  I believe then that I may have defective hardware; I'll get another USBstick and try it out again. 

    I was wondering, in the next release of the USB testing program (PC app), would TI also be making the source code available?  This would really help with integrating the functionality into other applications.  When (approximately) would the new CSL release be available?

    Regards,

    Ed.

  • Hi Ed,

    From what I know the CSL v2.01 USB examples are not meant to support eZdsp55x5, they are for EVM55x5 circuitry.

    What happens is that the board does not enumerate in the USB bus in any of the CSL USB examples.

    Also I do not know anyone that has used out of the box witout modifications the CSL in order to exercise any of the USB examples in eZdsp55x5.

    Since it works for Hyun I'm also keen to see how he managed the 2.01 examples to work on eZdsp!

     

    What does work though is SpectrumDigital's USB example from here

    -> http://support.spectrumdigital.com/boards/usbstk5515_v2/reva/files/usbstk5515_BSL_RevA.zip

    so you can test if your hardware is ok using the usb example from there (USB mouse buttons).

     

    Regards,

    Christos

     

  • Hi Ed,

     

    The new CSL release will happen within a couple of months. It's under testing with C5515EVM and C5515 eZDSP.

     

    Regards,

    Hyun

  • Good news to all.

    We'll include a source code of PC application.

     

    Regards,

    Hyun

  • Hi Christos,

    While it's not possible with the C5505 UsbStick (EVM was the only option), the C5515 USBStick can apparently communicate with the host via USB.  There was some discussion about this on another thread, if I understood it correctly:

      http://e2e.ti.com/support/dsp/tms320c5000_power-efficient_dsps/f/110/t/47278.aspx

    Plus Hyun's posts back this notion.  But when I get a new stick and actually get it working myself I'll let everyone know.

     

    Regards, Ed.

  • That is really good news.  Keep up the good work everyone!

    Regards, Ed

  • Ed,

    I have a eZdsp5515 and my remarks are for the CSL 2.01 on eZdsp5515.

    Hyun could enlighten us  on what CSL version he tests eZdsp5515 and works ok on USB.

     

    Regards,

    Christos

     

     

     

  • Hi,

    I want to clarify of which CSL version working on eZdsp USB SD card example.

        CSL 2.01 CSL 2.1 (under testing and future release)

    C5515 eZdsp          USB_SD card (X) USB_SD care (O)

     

    C5515 EVM         USB_SD care (O) USB_SD care (O)

     

    The reason CSL 2,01 dose not work with USB_SD card is that the hardware different between EVM and eZdsp. The next CSL 2.1 release will fix it.

    Other USB example not using SD card work with both EVM and eZdsp.

    Regards,

    Hyun

  • All,

     

    The PC application (source) code  attached. This code will be added to CSL formal release. You can start use this code.

    Regards,

    Hyun

  • This is really great!  It looks to have absolutely everything that anyone would need to get going on both sides - target and PC host.  I just have to wait until I my new USBStick arrives as the one I have is still not functioning properly.  But I'll keep everyone posted as to my progress with the new hardware.

    Thanks again for your efforts and responsiveness.

    Regards, Ed

  • hyun, I am having some trouble running the c5505usb_ep_diag.exe. Specifically it is

    waiting to attach to the target USB port. Let me give you some details.

    I am using a C5515EVM and have been able to test the user USB (not JTAG) port using the

    USB mouse example that comes with the C5515 installation CD.

    I am trying to write a program that sends and receives packets of data between the host

    pc and the EVM5515 user USB port which is what your example does that you posted on

    wiki.

    I read the instructions in the README1st below:

    ///////////////////////////////////////////////////
    How to Run the c5505usb_ep_diag.exe

    This test is designed for testing the read/write for C5505 USB <--> PC. The USB FIFO

    size is 512 byte.


    1. Install the C5505USB_EP driver on the Host PC (WinXP)

    1.0.    open a DOS command window and type in the following commands
    1.1.    wdreg -inf <directory path to .inf>\C5505USB_EP_driver.inf install
    1.2.    wdreg -inf <directory path to .inf>\C5505USB_EP_device.inf preinstall
    1.3.    copy "wdapi1010.dll" to %windir%\system32

    Normally the %windir%\system32 directory is C:\WINDOWS\system32
    if you want to make sure the directory location, you can do following under window
    Start (on the bottom-left corner of the PC) -> Run -> %windir%\system32

    2. Power up the C5505 EVM and connect a JTAG to the EVM

    3. Load and run the "UCSL_USB_PollExample_Out.pjt" (usb/example1), 

    "CSL_USB_IntcExample_Out.pjt" (usb/example2),
    or CSL_USB_DmaExample_Out.pjt" (usb/example3) under c55xx_csl\ccs_v3.3_examples or

    c55xx_csl\ccs_v4.0_examples
    in CSL release

    4. Connect the USB cable between C5505 EVM and the PC, Window will prompt "a new drive

    has been found";
    Do not use wizard, just tell the installation program you have a specific location, then

    tell it where
    the "C5505USB_EP_device.inf" is. Wait until it finishes.

    5. USB Endpoint Read Test: Run c5505usb_ep_diag.exe by double click it. Simply select

    5.1.    Select "4" for the first prompt (Read/Write from pipes)
    5.2.    Select "4" for the second prompt (Check Streaming READ speed)
    5.3.    Type in "81" for the third prompt (Use EP1 IN)

    6. USB Endpoint Write Test: Run c5505usb_ep_diag.exe by double click it. Simply select

    6.1.    Select "4" for the first prompt (Read/Write from pipes)
    6.2.    Select "5" for the second prompt (Check Streaming WRITE speed)
    6.3.    Type in "02" for the third prompt (Use EP2 OUT)

    7. The reading and writing speed will be displayed after the tests are finished.

    The source code for the c5505usb_ep_diag.exe is in C5505USB_EP_diag_src. You will need

    the Microsoft
    Visual Studio 2005 or later to be able to build it.
    ////////////////////////////////////////////////////////////////////////////////////////


    However after I load and run the target program (UCSL_USB_PollExample_Out) and then run

    the host program (c5505usb_ep_diag.exe) the console message is:

    'dos> Please make sure the device is attached:'

    Also STEP 4 above did not happen. The PC did not recognize the USB port and I don't see

    "unknown devices" in my device manager.

    Can you please walk me through what I need to do....I would appreciate it. Now the

    original USB (mouse) program is also not working.

  • Hi,

     

    I guess that you are using CSL 2.01. We know there are enumeration issue on that release. There is a USB descriptor not correctly implemented. We have fixed it and will release soon.

     

    Regards,

    Hyun

  • Hi Hyun, have you got good news for the developers that use USB and CSL 2.01? There is a prevision of the new release of C5505_USB_Host_Tool or CSL?

    Regards,

    Andrea

  • I'm trying to use the c5505usb_ep_diag tool to aid in developing on our target custom hardware.  I followed the instructions in the readme1st file, and had no problems.  The device manager shows a Jungo device, with a C5505USB_EP (driver jungo 12/14/2009) and WinDriver device (driver Jungo 8/31/2010) under it, all of them indicate they are operating properly.  When I try to do step 5:

                 5. USB Endpoint Read Test: Run c5505usb_ep_diag.exe by double click it. Simply select

    I get a command window that says:

                 Please make sure the device is attached:

    And cannot issue any test commands.  The csl_usb_dma_example code has run to its background loop with no errors displayed.  Am I missing something?

    Thanks in advance for your help,

    Dan

  • After further debugging...

    When I run the example code with the cable connected, Windows gives an unrecognized device error.  The device managwer shows a USB device with a PID and HID of 0000.

    When I run the example code, and then connect the cable, no device is added in Windows.

  • Hi,

     

    Are you using the latest CSL2.1? If not, please use it at http://focus.ti.com/docs/toolsw/folders/print/sprc133.html

    Regards,

    Hyun

  • Yes, CSL 2.1.

  • I'm using Code Composer 4.1.3.00038

    The DMA USB example fails to respond properly to a CSL_USB_DEVICE_DESCRIPTOR_TYPE request three times, VID and PID received by the host are zeros.  The host sends a reset command twice before it suspends the operation of the unknown device.  My host is a Windows XP pc.

    I've run the Spectrum Digital example with no problem.  The HID and PID set on the host are correct.

    The same sequence of transactions are received by both examples until the DMA example fails; suspend, reset, suspend, reset, get device descriptor, two transactions whose CSL_USB_PERI_CSR0_INDX_RXPKTRDY_MASK test fails and the usbSetup.bRequest does not equal 0x05, and a reset. Thereafter the DMA example repeats the attempt to get the device descriptor and fails, while the Spectrum Digital example continues on in its setup.

    I'll try the interrupt example, seems the problem may lie in the DMA.

  • Hi Dan,

    These exact symptoms that you specify were also in my case when I had the old CSL v2.01,

    now with the new CSL v2.10 the examples work ok here. USB LDO is powered properly in the new CSL 2.10.

    ( 2.01 -> 2.10 )

     

    Regards,

    Christos

     

  • I have:

    - uninstalled and reinstalled the CSL 2.10 from the link provided above

    - imported the existing CCS/CCE Eclipse projects from the newly created C:\Program Files\TMS320C55XXCSL-LOWPWR directory into Code Composer 4

             cslVC5505   (V????)

             CSL_USB_DmaExample_Out

             CSL_USB_IntcExampleOut

             CSL_USB_PollExample_Out

    - created target configurations in each project for XDS100v2 USB Emulator and TMS320C5505 target

    - built the projects and ran them

    - verified that the USB_init function sets the LDO to 1

    In each case, the Windows device manager added an unknown device with PID and VID set to zero under USB controllers.

    Did I miss anything?

    It's odd that the CSL library project has a V in its name.

     

  • Dan,

     

    Not sure but it could be then some other issue.

    Yet eclipse sometimes behaves strange in re-import situations.

    If you do not have anything useful done in the CSL or any other application developed in that workspace then you could delete them to be safe.

    I would uninstall the CSL, delete its folder, install it again, then I'll specify a new workspace name to be safe and clean, after that I would import the new csl projects into that to re-test.

     

    Regards,

    Christos

     

  • I have uninstalled CSl 2.10, deleted its directory, deleted my workspace directory, reinstalled CSL 2.10, imported its USB and cslVC5505 projects (the V is still odd), rebuilt, configured the target for the XDS100v2 emulator and TMS320C5505.  I also uninstalled and reinstalled the Jungo test drivers.

    Same results: unknown device is added, VID and PID = 0x0000.

    I verified that the LDO is set to 1 in USB_init.

    The reimported and rebuilt Spectrum Digital example still works.

  • After some more debugging, USB_init line 133 of csl_usb.c seems to be the problem:

    CSL_FINS(usbRegisters->DEVCTL, USB_DEVCTL_SESSION ,TRUE);

    This line causes the Windows XP host to attempt enumeration, but the target's call back functions and endpoints have not yet been initialized.  Moving it to the end of USB_init did not solve the problem. Commenting it out caused the enumeration to occur on the call to USB_connectDev in main, but still no PID or VID in the Windows device manager.

  • Did you have any luck with this?  I am currently trying to execute the CSL USB examples under WinXP 32bit, and I receive a "Unrecognized USB Device" error when I plug in the cable.

    I am using the VC5505 EVM, and I have correctly set the required #defines.  I have CCS 4.1 and CSL 2.1.

    Thanks,

    -Jason

  • Hi,

    I try to run examples from c55xx_csl

     TMS320C55XXCSL-LOWPWR\c55xx_csl\ccs_v3.3_examples\usb\example2\

    and

    TMS320C55XXCSL-LOWPWR\c55xx_csl\ccs_v4.0_examples\usb\CSL_USB_IntcExample\

     

    Only using CCS3 it is possible to connect board via usb to PC.

    Do you have properly made code/lib example  I can use in CCS4?

  • Evgeniy,

    What board are you trying to connect to the PC?

    And you should be able to use the ccs_v4.0_examples with CCS4. Can you provide me with more details about the error you're getting?

    Regards,

    Juliana Almeida

  • I use tms320c5515 evm,  and target device on 5504.

    1 was setup drivers wich uses  wdapi1010.dll (C5505USB_EP_installation from C5505_USB_Host_Tool  or the same from USB_BootUp packet )

     

    2 then I start empty chip with empty flash (uses internal boot) PC write that usb device is connected and then I start host tool/usb boot tool it work.

     

    3 then I start my application - example  it gives:

    3.1 the same result=OK if I use apllication was made  from TMS320C55XXCSL-LOWPWR\c55xx_csl\ccs_v3.3_examples\usb\example2\ make via CCS3

    3.2 "usb device Not Recognised" in case TMS320C55XXCSL-LOWPWR\c55xx_csl\ccs_v4.0_examples\usb\CSL_USB_IntcExample\ make via CCS4

  • When you're booting from the USB, are you connecting it to the J11 port or J2?

    J2 is used for connecting to the PC for debugging and emulation, while the J11 USB port is used for booting and testing the USB examples

     

  • Juliana.

    I use j11 to communicate  via usb. It work for boot and for example made on CCS3.

    And it fail for example made on CCS4

  • Dan Cooper said:

    Same results: unknown device is added, VID and PID = 0x0000.

    I solved this problem by switching from Debug mode to Release mode.

    I've also noticed that this happens if you put even a small amount of code that delays the response time of the first "interrupt".  My guess would be that the system has a pretty short window will it expect a response from the request for a device descriptor, and if you dont get it in time, it assigns 0x0000's to everything.

    -J

  • Jason Matalka said:

     

    I solved this problem by switching from Debug mode to Release mode.

    ...

    are you use CCS3? At CCS4 I can not find such switch.

  • the problem was solved after I update my CGT to 4.3.8.

     

  • Hi all,

    I'm looking for the PC application (including source code), where can I find it? it was mentioned Hyun but I couldn't find the attachment,

    Thanks,

    HR

  • Sorry but don't understand what are you looking for? Are you running CSL examples? Please explain further.

    Regards.

  • Hi Steve,

    Yes, I'm running the CSL USB example - DMA Mode Test (on the C5515EVM) and I'm looking for the host (PC) USB tool which I can't find (Including the source code),

    Thanks,

    HR

  • HR,

    We are in the process to confirm if this code be posted for open download becuase of licensing restriction. But for sure we can not provide the source code. Only the executable. If the want the executable, please provide your email address and I will send it.

    Regards.

  • Hi Steve,

    I have sent you a friend request so than I can send you my Email privately.

    Thanks,

    HR

  • thank you :))