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.

How to run USB_DEV_BULK example from StaterWare on LogicPD Eva brd

Other Parts Discussed in Thread: OMAP-L138, SW-USB-WINDRIVERS, AM1808, OMAPL138, OMAP-L137, AM3517

Hello,

I'm able to compile and run the Usb_Dev_Bulk from StaterWare using CCS-v5 on LogicPD OMAP-L138 Eva Brd

I also found "usb_dev_buld.inf" from StellarisWare as mention in the file "usb_dev_bulk.c" from the example, but I'm NOT able to do driver installation using that INF file

What should I do ?

Thanks,

~Duy-Ky

  • I used the usb_dev_bulk.inf and it did install on my Windows XP box. The INF file was not by itself. It was part of a package of files.

  • Hello Norman,

    I've just started to learn how to use USB comm to replace the existing serial comm for higher throughput.

    It appears to me USB buld mode is a right one to use and I found an usb_dev_bulk from StarterWare package
    I have some questions

    1) My PC is not able to detect a USB device when the Eva board is powered up, but ONLY after I run the "usb_dev_example". So TI let us to define our own VID ?

    2) After up and run, the PC detects USB and it appears in Device manger as "Unknown Device", I update driver using "usb_dev_bulk.inf" and got error popup window "Select Device" with msg "The specified location does not contain information about your hardware"!?!?

    3) Could you recommend a better example OR different setting for this example ?

    4) I'm not sure how to deal with WinUsb.sys ? Could you provide me some detaile sequence how to install the driver ?

    Thanks so much Norman,

    ~Duy-Ky

  • I think I am the wrong person to ask those questions. The USB bulk example ran and installed smoothly for me. I did not dig too deep into the matter. I used the driver from here:

    http://www.ti.com/tool/sw-usb-windrivers

    and the application here:

    http://www.ti.com/tool/sw-usb-win

    My steps:

    1) Startup the USB Bulk Example on the Device.
    2) Wait for Windows to offer to install the driver.
    3) Somewhere in all the buttons, there is an option to let you browse to a driver.
    4) Navigate to the driver folder and windows should automatically find the INF that matches.
    5) After Windows installs the driver. Run the usb_bulk_example.exe.

    WinUsb should come built-in with the later versions of Windows. My WinXP SP3 box had it already installed. The source code for the Host side of USB Bulk Example appears to have been dropped from the StarterWare packages. I had to download the rather large StellarisWare package to obtain the rather small source code.

    The USB bulk example should allow you to change to VID and PID. On the Device side, change the PID and VID in the descriptor definition. On the Host side, changing PID and VID in the INF to match,

  • Hi Normal,

    I'm not able to find winusb.sys. Coudl you send me yours and tell me what it lives ?

    Thanks so much for your help, Norman

    ~Duy-Ky

  • Not in the office. I'm can't access my development machine right now.  I double checked the supported systems here:

    http://msdn.microsoft.com/en-us/library/windows/hardware/ff540196.aspx
    http://msdn.microsoft.com/en-us/library/windows/hardware/ff540283.aspx

    I guess on WinXP, the USB Bulk Example driver used a coinstaller to install winusb.sys. It's not quite built-in. It might have gotten installed with one the many other WinUSB based drivers. The StarterWare driver package has a sub directory 'i386' with WdfCoInstaller01009.dll and winusbcoinstaller2.dll. That's where winusb.sys is supposed to come from. That's all I got. Sorry I can't help more.

  • I guess the main problem is the missing winusb.sys.

    I checked all my 5 XP PCs, at home and at work, and found no such sys file.

    I download and install both new version WDK and old DDK, and found none either.

    Thanks so much for great help, Norman

    ~Duy-Ky

  • Hi TI Employee,

    I'm evaluating usage of USB in our furure product using TI OMAP or the like (AM1808, C674x, ...)

    I starts with LogicPD OMAP-L138 Eva board and StarterWare example "usb_dev_bulk"

    There're 2 ways for USB : (1) WinUSB supports up to Windows Vista (2) LinUsb-Win32, per StarterWare USB wiki page

    http://processors.wiki.ti.com/index.php/StarterWare_USB#Bulk_Device_Class

    I ran into so big problem using WinUSB while, as you've seen on this page, it worked smoothly for Norman Wong.

    As our future products won't be limited to Windows Vista, so I don't want to waste time on trouble-shooting WinUSB case, but rather to look at Lib-Usb-win32

    I'm able to use LibUsb-win32 to generate INF and work with some USB dev, but NOT with TI USB

    1) StarterWare USB recommends to use Stellaris USB INF where VID_1CBE & PID_0003, but LibUsb-win32 detects VID_0000 & PID_0000

    2) I used LibUsb-win32 to generate INF for both cases (VID_1CBE&PID_0003 and VID_0000&PID_0000), but failed to install driver. Using exactly the same way, I'm able to generate INF and intsall driver for other USB device

    You have any idea on this problem ?

    Thanks,

    ~Duy-Ky

  • Okay, back at my PC. Some directories:

    07/13/2009 06:16 PM 16,896 C:\WINDOWS\system32\winusb.dll
    07/13/2009 04:51 PM 34,944 C:\WINDOWS\system32\driverswinusb.sys

    Directory of SW-USB-windrivers-6459\windows_drivers
    09/07/2010  08:33 PM 3,975 boot_usb.inf
    09/07/2010  08:33 PM 5,727 boot_usb_amd64.cat
    09/07/2010  08:33 PM 3,875 boot_usb_x86.cat
    09/07/2010  08:33 PM 3,458 qs-scope.inf
    09/07/2010  08:33 PM 3,971 qs-scope_amd64.cat
    09/07/2010  08:33 PM 3,021 qs-scope_x86.cat
    09/07/2010  08:33 PM 2,192 signing.txt
    09/07/2010  08:33 PM 3,989 usb_dev_bulk.inf
    09/07/2010  08:33 PM 3,979 usb_dev_bulk_amd64.cat
    09/07/2010  08:33 PM 3,029 usb_dev_bulk_x86.cat
    09/07/2010  08:33 PM 1,696 usb_dev_chidcdc.inf
    09/07/2010  08:33 PM 1,265 usb_dev_chidcdc_amd64.cat
    09/07/2010  08:33 PM 1,253 usb_dev_chidcdc_x86.cat
    09/07/2010  08:33 PM 1,725 usb_dev_cserial.inf
    09/07/2010  08:33 PM 1,265 usb_dev_cserial_amd64.cat
    09/07/2010  08:33 PM 1,253 usb_dev_cserial_x86.cat
    09/07/2010  08:33 PM 1,170 usb_dev_serial.inf
    09/07/2010  08:33 PM 1,263 usb_dev_serial_amd64.cat
    09/07/2010  08:33 PM 1,251 usb_dev_serial_x86.cat

    Directory of SW-USB-windrivers-6459\windows_drivers\amd64
    09/07/2010  08:33 PM   242,176 lmdfu64.dll
    09/07/2010  08:33 PM     4,312 lmdfu64.lib
    09/07/2010  08:33 PM   245,760 lmusbdll64.dll
    09/07/2010  08:33 PM     2,798 lmusbdll64.lib
    09/07/2010  08:33 PM 1,721,576 WdfCoInstaller01009.dll
    09/07/2010  08:33 PM 1,002,728 winusbcoinstaller2.dll
    09/07/2010  08:33 PM 2,152,176 WUDFUpdate_01009.dll

    Directory of SW-USB-windrivers-6459\windows_drivers\i386
    09/07/2010  08:33 PM   207,872 lmdfu.dll
    09/07/2010  08:33 PM     4,558 lmdfu.lib
    09/07/2010  08:33 PM   210,432 lmusbdll.dll
    09/07/2010  08:33 PM     2,904 lmusbdll.lib
    09/07/2010  08:33 PM 1,461,992 WdfCoInstaller01009.dll
    09/07/2010  08:33 PM   851,176 winusbcoinstaller2.dll
    09/07/2010  08:33 PM 1,837,296 WUDFUpdate_01009.dll

    SW-USB-windrivers-6459\windows_drivers\win2K
    09/07/2010  08:21 PM 1,445 usb_dev_chidcdc_win2k.inf
    09/07/2010  08:21 PM 1,551 usb_dev_cserial_win2k.inf
    09/07/2010  08:21 PM 1,430 usb_dev_serial_win2k.inf

    My machine Windows XP SP3. I do have the WDK 7600.16385.1 installed but it does not have a winusb.dll or winusb.sys.

  • Hello Norman,

    My plan is first to start with WinUSB to see how TI OMAP USB responds and would replace WinUSB with LibUSB-win32 as WinUsb supports up to Win-Vista, but no limit in LibUsb-win32 (per StarterWare USB wiki). The reason was I thought it should be up and run right away.

    But it turns out not the case !?!? So now I starts using  LibUsb-win32 as its convenience is to generates INF. I tried and it worked for some USB devices, but not for TI OMAP USB. I've been waiting for TI team to confirm how TI OMAP USB works

    Thanks so much for your great help, Norman

    ~Duy-Ky

  • Hello team,

    Is there an update available regarding this inquiry?

  • Hello Duy-Ky,

    When a device ( such as OMAPL138  - usb_dev_bulk ) is connected to USB host (PC in this case ) , the USB  host would fetch the descriptors from the device. Windows USB stack would fetch these descriptors and would then load the corresponding driver if available. The VID and PID of a device is fetched when the host fetches the device's DEVICE descriptor and the windows USB stack does not need any custom driver to do so. 

    I have generated a libusb-win32 INF file using the INF file generator with the following VID and PID and verified its working on an AM1808 ( similar to OMAPl138 ) evaluation board using a release binary of usb_dev_bulk example. 

    VID : 0x1CBE

    PID :0x0003

    I have used the same INF file on both WIN-XP (SP3)  and Win7 platforms and found that the device come up on the device manager as

     libusb-win32 devices -> StarterWare Bulk device.

    Steps to install Device driver (libusb-win32)

    1. Please extract the libusb-win32 installer into a folder
    2. Use INF file (sttached to this post) to introduce the device
    3. Point to the libusb0.sys file when asked for by the driver installation wizard. You can find this at ( libusb-win32-bin-x.x.x.x\bin\x86) 

    Please do note that you will have to write your own application driver using the API's provided by libusb-win32 so that the PC can communicate with  the device (usb_dev_bulk).

    libusb-win32  can be down loaded from http://sourceforge.net/apps/trac/libusb-win32/wiki

  • Hi Vineeth,

    There's no guarantee it works for OMAPL138 when it works for AM1808, due to difference silicon.

    As the code claimed to derived from Stellaris, so I bought a Stellaris Eva Kit and it DOES work for Stellaris using exactly the same usb_dev_buld from StellarisWare with LibWin32

    I have 2 OMAPL138 PD Logic Eva board and both failed with the example

    I'm sure there's no problem on PC with LibUsb-win 32 as it works for

    1) Stellaris using the same example usb_dev_buk

    2) Atnel SAM3S Eva borad

    3) MicroChip PIC USB demo

    So, the problem appears on OMAPL1348 itself, either

    1) Config code

    2) USB Lib

    3) USB App

    So, could you test and verify on OMAPL138 and let me know the outcome

    While waiting for you to try on OMAPL138, could you please zip and me the whole project :usb_dev_bulk" = Target Config GEL file + App code

    Thanks,

    ~Duy-Ky

  • Hi Vineeth,

    You have stuff working for AM1808, could you send me that stuff and exactly what Eva board used for the job

    Thanks,

    ~Duy-Ky

  • Hi Duy-Ky,

    I have used an OMAPL138 evaluation board ( ZOOM L138 EVM ) from Logic PC  for testing the usb_dev_bulk class. You can find the reference at

    http://www.logicpd.com/products/system-on-modules/zoom-omap-l138-evm/

    The binary I have used is the latest AM1808 Starterware release - version 01.00.03.03. You can get the same from the StarterWare website. Since the ARM core is the same on Am1808 and OMAP L138  i have used the AM1808 StatrerWare package on OMAP L138 eval board and found them to be working fine with the INF file generated from libusb-win32.

    Please try the same and I believe it should work straight away.

    I had attached the INF file (as a txt file - rename it to INF) in my previous post.


     

  • Hi Vineeth,

    Below is my lastest situation

    1) I have 2 such boards, exactly the same in the link you send me, and both failed in USB enumeration.

        >> I have Rev B, WHAT Rev on your board ??

    2) I'm using exactly the same example "usb_dev_bulk" from AM1808_StarterWare_1_00_03_03

       I'm using CCS-v5.2.1 with

       2.1) GEL file : try both a) OMAP138_ARM.gel and b) AM1808.gel

               >> What GEL file you used

       2.2) DSP a) Untouched and b) bypassed

              >> How you treated DSP (untouched or bypassed)

    I have failure in USB enumeration. PC cannot recognized USB device due to VID_0000 & PID_0000

    Thanks,

    ~Duy-Ky

  • Hi Vineeth,

    Could you tell me what compiler tool and its version you used for good usb test

    Thanks,

    ~Duy-Ky

  • Hi Duy-Ky

    As mentioned in my earlier post , I have used the released binary (AM1808 Starterware release - version 01.00.03.03) to check whether usb_dev_bulk example works. 

    In case you are using CCS5.2 for building the AM1808 StarterWare package ,please ensure that you use the compiler version 5.0.1. Previous compiler versions did not support unaligned access and hence the USB examples were not working.  You would need to contact TI field applications engineer to get access to the modified code.   

    AM1808 Starterware release - version 01.00.03.03 was compiled using gcc .

    [ Edit: link was removed as it was pointing to an internal address ]

  • Hi Vineeth,

    I did try GCC ands it worked for me so I checked with you on your compiler.

    I also update to TI compiler 5.0.1 but it put out so many errors.

    So I stick with GCC for now

    Bew low is my latest problems

    1) I can run USB ONLY ONCE after HW reset

    2) It's NOT possible to handle a big transfer, say 4 M. I'm quite aware that 64 Bytes is max for a packet, and I guess USB stack handle the situation

    I did evaluate a simple PIC USB (20MHz clock) and it does transfer of 4 MB in 6 secs

    I expect AM1808 (300 MHz) should do better than that.

    I'm looking forward to your confirm of AM1808 USB performance

    Thanks,

    ~Duy-Ky

  • Hi Duy Ky

    Have you written any Windows side application to transfer the 4MB file ? I have only verified sending text streams

     

  • Hi Vineeth,

    Yes, I did write Win App for to get that result. It is a Console App, so not flexible to use. I'm upgrading to easy-to-use GUI, I send to you once done, so we're able to double check each other to make sure to get the best out of the chip

    For the time being, could you confirm the problems below I'm facing

    ??) USB Enum is passed only at the FIRST RUN after powered up

    Below is my procedure

    1) Power up the brd

    2) Load and Run the example "usb_dev_bulk" app

    3) USB Enum is passed

    4) Stop - Re-Load - Re-Run the example

    5) USB Enum failed!!!

    Any idea ?

    Cheers,

    ~Duy-Ky

  • I've had similar problems with the OMAP-L137 EVM. To rerun the code, I have to "Run->Reset->System Reset", "Terminate" and "Debug" again. A touch better than power cycling the board. I don't have to close and restart CCS V5. Saves are few minutes.

    I think the USB HW / PHY init code is missing something. I ported over the Linux USB PHY init and that seems to allow me to suspend, restart and resume.

  • Hello Norman,

    You're absolutely right. Either I have to recycle the power OR press reset button.

    Now using your way realy save me a lot of effort as I have to modify the code and re-run for user interface via USB.

    BTW, you were absolute right as saying to run the example usb_dev_bulk right away. Now I realize that if I had no problem if I had used the pre-compiled binary as, per Vineeth, it was compiled using GCC

    I ran into this kind of problem "PACK" where a data structure mixed with different type of 8/16/32 bit as I was working on data structure to collect GPS data. In this case, the data structures are for USB desciptors

    I really appreciate your great support, Norman

    Regards,

    ~Duy-Ky

  • Hi Vineeth,

    Now I have a GUI version to test USB Dev Bulk in write mode only

    I modified the app Test_Bulk from LibUsb-win32 where the LENGTH of TX data is used in place of TX data itself.

    Original : 1 2 3 4 => to TX 4 bytes with values : 1 2 3 4

    Modified : 10 => to TX 10 bytes with values : 0 1 2 3 4 5 6 7 8 9

                       I also included the TX time

    Using this app, I have some results below

    1) TI OMAP : I'm able to TX below 256 bytes, but NOT above 256, even after I change buffer size from 256 to 0x50000 (5 M) in the file "usb_bulk_structs.h"

    2) PIC USB : TX 4 M in 0.5 second (10 times faster I tested at my Home PC due to a much better PC at work). Needless to say the PIC USB chip is PIC18F4550 has only 20MHz clock and 2KB RAM, while TI OMAP has 300MHz and 128 MD RAM

    The result is really disappointing on TI OMAP USB!?!?!

    Please find the app in the attached below. IPlease unzip to somewhere, there'2 files : EXE & DLL

    You probably used Test Bulk in testing your  data stream, so you could use this tool easily, the only difference is you provide ONLY a single number for the length to TX data

    4505.Test_Bulk_01.zip

    ~Duy-Ky

  • Just a comment about the various buffer sizes. The file usb_dev_bulk_structs.h has this:

    #define BULK_BUFFER_SIZE 256

    But this is refined in the implementation usb_dev_bulk_structs.c

    //*****************************************************************************
    //
    // The size of the transmit and receive buffers used. 256 is chosen pretty
    // much at random though the buffer should be at least twice the size of
    // a maximum-sized USB packet.
    //
    //*****************************************************************************
    #define BULK_BUFFER_SIZE 256

    So changing the buffer size in the header will not change the value in the implementation. The compiler will not catch it if you are using pre-compiled libs. The value in the header would then be the value the lib was compiled with and is not changeable. You'd have to rebuild the library or pull in the StarterWare source into your project.

    You might get throughput by increasing the endpoint packet size in usbdbulk.c. For bulk endpoints, I think 512 is the maximum. From the above comment block, BULK_BUFFER_SIZE should then be 1024.

    //*****************************************************************************
    //
    // Maximum packet size for the bulk endpoints used for serial data
    // transmission and reception and the associated FIFO sizes to set aside
    // for each endpoint.
    //
    //*****************************************************************************
    #define DATA_IN_EP_FIFO_SIZE    USB_FIFO_SZ_512
    #define DATA_OUT_EP_FIFO_SIZE   USB_FIFO_SZ_512

    #define DATA_IN_EP_MAX_SIZE     USB_FIFO_SZ_TO_BYTES(DATA_IN_EP_FIFO_SIZE)
    #define DATA_OUT_EP_MAX_SIZE    USB_FIFO_SZ_TO_BYTES(DATA_IN_EP_FIFO_SIZE)

    Note the frequently observed typo "IN" instead of "OUT". Harmless when in and out are the same size.

    You might have to also suggest 2.0 in the descriptor for high speed.

    unsigned char g_pBulkDeviceDescriptor[] =
    {
    ...
        USBShort(0x200), // USB version 1.1 (if we say 2.0, hosts assume
                         // high-speed - see USB 2.0 spec 9.2.6.6)
    ...
    };

    My code version is C6748 StarterWare 1_20_03_03.

  • Hi Norman,

    I did compile everything, all libs and app, but it still gets stuck at 256 B.

    I also found out it's using DMA_MODE . I'm really surprised if DMA cannot handle more than 256 bytes!?!?

    I learned from USB spec that MAX buffer for endpoint is 64 bytes, except in isochronous mode with 1024

    In bulk mode, I believe Host PC splits data into packet of 64B and sends out each and waits for N/ACK for data integrity (like TCP). Isochronous mode similar to UDP

    While I have no problem in using PIC with only 64 byte buffer and no DMA in receiving 4 MB (PC sends out 4 MB)

    Regarding USB version, I'm using USB Expolorer box to monitor USB traffic and it detected high-speed hand-shake.

    In addition, I've seen in the forum, a TI employee claimed it's not possible to use as USB 1

    The USB bulk mode is used to handle huge data, so why I cannot even dealt with more than 256 bytes. It's very very frustrating

    Thanks so much for your comment, Norman

    ~Duy-Ky

  • Hi  Duy-Ky,

    You are right when you say that the Maximum packet size is 64 bytes. The OMAP l138 board reports itself as a custom full speed bulk device to the windows host and hence windows would use a MAX packet size of 64 byes only . Having said that, there should not be a limitation  in the file size other than the max buffer size for received data. I have not seen the code and hence am not sure. 

    usb_dev_bulk is working in PIO mode and not in DMA mode as you claim. If you are looking at max throughput, is there any chance of using the usb_dev_msc example having a RAMDISK and  high speed capability.

  • Vineeth states that OMAP-L138 board reports itself as a full speed. Yet USB Explorer sees the high-speed handshake. Something is mismatched. Maybe at the wire level, the USB HW is operating at high speed. Maybe at the USB driver level, it is operating at full speed. Maybe the host is only using a fraction of the real bandwidth. Quite a puzzle.

    It's been my belief that the max packet size for a bulk endpoint is 64 for full speed and 512 for high speed. The larger packet size does help as there is less overhead per data byte. But if the PIC can outpace the OMAP at 64 bytes packet by an order of magnitude, then I guess there is not much point increasing the max packet size.

    Are the PIC USB Descriptors exactly the same as the OMAP USB Descriptors? Microsoft used to offer a utility called UVCView as a separate download. It's now bundled up in the DDK/WDK. Try "Thesycon USB Descriptor Dumper" at:
    http://www.thesycon.de/eng/usb_descriptordumper.shtml

  • Hi Norman,

    If I read it right from USB spec, it says there're only 2 modes : low speed and full speed, once the host detects USB-2 from device descriptor, it pumps to high speed

    I guess we have to use USB1 hub to get full speed 12 Mbps from USB2, similar to the case 100M/1000M Ethernet ?

    I also evaluated Atmel USB and Stellaris as OMAP USB derived from Stellaris, using Ellisys USB Explorer, I found there's no NACK (bad transactions) from PIC and Atmel boards, but quite so many from both Stellaris and OMAP board. It's very frustrating, Norman

    Thanks for your idea, Norman

    ~Duy-Ky

  • Hi Norman,

    I took a trace of AM18x bulk device hooked to a PC and found what you have said . The  OMAP-L138 board reports itself as a full speed device during enumeration but responds to HS transactions on the wire. The endpoint descriptors also report that they have a MAX packet size of 64 bytes.I believe that this confuses the host and the host starts sending out SPLIT transactions to which the device does not respond. These issues have cropped up while porting the StellarisWare stack for OMAP L138/AM18x platform.

    As you had stated earlier there is a 256 byte restriction on the data transfer. I will have a look at the code and respond to the same. Your suggestion of  512 byte max packet size should also work . I am still hard pressed to explain the performance  drop.

      

     

  • Hi Vineeth,

    It appears to me TI USB has very low preformance due to bad data from the board to PC resulting so many NACK at PC side

    Below is a result summary of TI and PIC USB using Ellisys USB Explorer

                                                      TI                        PIC

    Useful transactions              86                       51

    NAKed transactions             408                      0

    Invalid transactions              241                      0

    Detected devices                  2                           1

    Detected enumerations       1                          1

    As you've seen, PIC has absolutely NO NAKed transactions while PI has 408. Surprisingly, PC detected TI has TWO devices while ONLY ONE in PIC case.

    I need to point out that I started both boards long before I did connect USB cable to the board, both were carried out the same way.

    So, why PC detects 2 devices in OMAP, is it reasonable ?

    Thanks, Vineeth,

    ~Duy-Ky

    6661.OMAP USB.pdf

  • Hi Vineeth,

    Below is my latest situation

    1) I found the exampled was set with USB-1.1, I changed to USB-2.00

    2) OMAP has 2 USB core : USB0 and USB1, as the example uses USB0, so I disable PSC for USB1

    3) After the change, I have exactly the same TWO problems

    Please have your USB team have a close look at

    1) Why PC detects 2 devices

    2) Why there're so many bad transactions from the board causing NACK at PC side

    Thanks, Vineeth

    ~Duy-Ky

  • I've retested usb_dev_bulk_example with USB Explorer hooked in. I experienced the same many NAKs and had problems with processing more than 8 bytes. I am using my own port of C6748 Starterware to the C6747 using CCSv3.3. That version of the CGT doesn't support packed structures. Once I reworked the code to avoid use of packed structures, I can process more than 8 bytes and the NAKs were reduced to the few that were expected dues to a lack of a data. Perhaps your CCSv5 is not configured to handled the packed attribute properly. Do you have either gcc support enabled or relaxed ansi support enabled?

  • Hi Norman,

    I did try with GCC and ended up with the same problem.

    I believe I got CCS-v5 setup correctly with new compile v5 with option -gcc, otherwise I cannot even to compile it

    I believe the root cause is PS detects 2 devices.

    I'm interested to know once PC detects ONLY ONE device and see if there're still many NACK ???

    I changed some option in desc struct, it's getting worse where PC detects THREE devices!?!?!

    Thanks, Norman

    ~Duy-Ky

  • I did not see more than one device. I checked the Windows Device Manager and used UVCView. I only see one. Where do you see more than one device? Maybe try deleting all of them from the Device Manager and replugging in to reinstall the drivers.

  • Hi Norman,

    We might not be able to see these info from PC, I got them from Ellisys USB Explorer.

    I did try to delete from Device Manager and re-installed using LibUSB-win32, it doesn't help.

    I tried with all other USB device, standard or custom, all are detected as ONE device and NO NACK once plugged in, except OMAP USB !?!?

    Have you tried with any USB analyzer, or this tool in particular ?

    The advantage of this tool is HW based with 2 port USB, 1 IN and OUT for DUT connect to one PC, and the 3rd USB for capture with reccomendation to use with 2nd PC

    All other approach is SW based, so I'm not sure how it detect enumeration phase when the USB itself not detected by PC SW ?!?!?

    So, it can monitor early since the setup phase of USB enumeration

    Thanks, Norman

    ~Duy-Ky

    ~Duy-Ky

  • I am using a Ellisys USB Explorer. It sees device 0 and 1 but I think device 0 is the Ellisys box itself. Attached is my USB Explorer file for plugging in, process 10 chars, and process 70 chars. I am using a Spectrum Digital OMAP-L137 EVM. Maybe your LogicPD EVM has a hub on it. Or maybe your PC has a internal hub. Rename the file extension to .ufo.

    3124.bulk_10_70_release.txt

  • Hi Norman,

    >> device 0 is the Ellisys box itself

    The Ellisys box detected only ONE device when I have PIC USB, it also detected ONE for Atmel USB, so it seems to me the 2nd device in OMAP is not from the Ellisys box itself. You might see there only ONE device in my previous PDF where I captured both PIC and OMAP USB

    Even I plugged a regular USB device, like FTDI, it detects only ONE device too.

    You may try with any regular USB device with your Ellisys box to see if it detects 2 devices ?

    >> USB hub on Logic-PD

    Per schematic, the USB connector goes straight to OMAP, so no external HUB.

    OMAP has 2 internal USB's, I disable the 2nd USB in PSC module, but I'm not sure if it's enough, only TI guy can tell, but haven't heard anything yet !?!?

    Thanks,

    ~Duy-Ky

    Thanks, Norman

    ~Duy-Ky

  • Ah, missed the PDF. I don't think you have a second device. The Host can tell a Device to use a different address, ie 2 instead of 1. Odd thing is that once everything is setup, the Host uses address 1 for PINGs and subsequent messages. Packets PING and NYET are high speed only. The PIC is connecting Full Speed? You won't see these packets there.

    My OMAP-L137 has two USB ports as well, an USB 2.0 OTG 2.0 and a USB 1.1 HCI. My GEL script enables the PSC for everything. The HCI port seems to have no effect on the OTG port. Not sure, I don't they even share pins. They don't share IRQs.

  • Hi Norman,

    >> I believe PIC is at high-speed

    1) USB Explorer detect high-handshak

    2) Descriptor is set with USB.2 option

    3) Data throughput is even a lot better than OMAP

    >> My OMAP L138 also has 2 USB like L137, but I disable USB-1.1 with PSC, unless I have to do further

    Per reference schematic, they have their own pins as they are separate cores. USB0 (USB2 OTG) is used as device and USB1(USB1.1) as host

    BTW, I'm curious how you run USB on C47xx, say using pspdrivers, DSPBios, ..., I'd like to explore it to see for further understanding how OMAP USB behaves ?

    Thanks, Norman

    ~Duy-Ky

  • It's been a year since I last looked at it. I tried the combination of DSPBIOS, BIOSPSP, EDMA and BIOSUSB packages. I remember it was a relatively painless build and execute. The BIOSUSB USB stack supports only HID and MSC. Other classes are available at cost from the BIOSUSB authors, Jungo. BIOSUSB is very hard to customize. The entire stack seems a bit resource intensive. The impression I get from this forum is that not a lot of people use it. One forum member,  Peter Myerscough-Jackopson, ended up writing his own stack for the C6748 and makes it available for sale, see http://www.macltd.com/products_usbdriver.php.

    If you are considering a DSP side, maybe try the DSP side version of StarterWare. In theory, behaviour should be the same as the ARM side, but never can be sure with TI's weird versioning system.

    In your USB Explorer logs, do you see two set address messages? One for address 1 and one for address 2? I assume nothing else is on the hub/bus with your EVM?

  • Hi Duy-Ky.

    I am trying to use usb-bulk with l138 too. my configuration: Win 7 x64 prof host, CCS 5.2 and Logic PD L138 EVM.

    I have lib-usb32 installed and seeing my device. now I downloaded your GUI application, but it does not see any devices. when I plug board into ubuntu host "Host connected" is wrote on the its screen, so I think it is recognized on some level and Lunux opens device. but not windows..

    what does your application actually looking for? some specific VID\PID?

    second question is what maximum throughput of USB you have achieved?

    Regards,

    Dmitriy.

  • Hi Dmitriy,

    1) You have to make sure using the latest TI compiler 5.0.1 with language option "-gcc", otherwise host PC will get wrong USB descriptors from your OMAP-L138 EVM due to packing process of unaligned data structures of descriptors

    How to update and get the settings correctly, you may want to look at the attached PDF AM1808_unaligned_access-issue-apfp.pdf in email from Vineeth previously in this very thread

    2) Make sure to generate driver first, before testing. My GUI was modified from a utility Test_Bulk from LibUSB-Win32 and I'm using 32-bit Win_XP. You may want to refer to my procedure below

    2.1) Download LibUSB_Win32 from http://sourceforge.net/projects/libusb-win32/. The package has both win32 and win64. You may want to use win64

    2.2) A utility Inf-Wizard in the package will generate INF for you, TI USB is derived from Stellaris with VID_1cbe and bulk PID_0003

    2.3) Run the utility "Test_Bulk.exe" from the package. You have to see your USB bulk device first in selecting to open with EndPoint 1

    2.4) Type in some data in TextBlock after the WRITE button, and click the button. It will report number of byte written or FAILED

    3) To compare with USB serial using FTDI, so I used the same file size 0x257000 and it takes 25 seconds, so 0.8Mbps, so very disappointing! Low-speed USB is at 1 Mbps, full speed @ 12 Mbps

    Good Luck,

    ~Duy-Ky

  • Hi Duy-Ky!

    thanks for fast and detailed response.

    could you please mail me them to issaev.dmitriy@gmail.com or upload to forum.

    about USB in l138 I can say it is very buggy itself. on linux I wasn't able  to make something to operate in reliable manner. bus could be restarted in any time. so with linux I'm testing am3517 now.

    regards,

    Dmitriy.

  • Hi Dmitriy,

    I sent you the PDF I mentioned previously, it's just some info how to use CCS to compile USB code, NOT a fixed code

    Cheers,

    ~Duy-Ky

  • Hi Duy-Ky,

    as wrote in pdf dokument

    Certain code changes are needed for making the examples to work with the new tool chain. They are system_config/armv5/cgt/cpu.c :changes to CPUIntStatus () change required for all USB demos

    and then

    Source code can be found here http://ap-fpdsp-swapps.dal.design.ti.com/images/0/0c/Unaligned_access_fix.zip

    but link is dead..

    I'll ask Vineeth too.

    Regards,

    Dmitriy.

  • Hi Vineeth,

    link to code fixes from document is dead

    http://ap-fpdsp-swapps.dal.design.ti.com/images/0/0c/Unaligned_access_fix.zip

    please verify!

    regards,

    Dmitriy

     

  • Hi TI and Duy-Ky,

    May I know that do you solve your "usb_dev_bulk" application now?

    How do you solve it (PC detects USB and it appears in Device manger as "Unknown Device")?

    This is because I face the same problem on TMDXLCDK138 (OMAP-L138 Development Kit (LCDK)) which is same OMAP processor as yours.

    Thank you very much.

  • Hi Hock,

    The device mngr reports "Unkown Device" as it's not able to enumerate USB device, PC host is not able to get USB descriptor from USB device

    There's a lot of areasyou have to look at

    1) Your program must have proper alignment of descriptor. The real downside of USB descriptor is a data structure with mixed type, 32-bit, 16-bit and 8-bit. If you trace back this thread, you'll find an email from TI mentioning how to fix this problem. The key point is language option "gcc" and compiler version to support this feature properly

    2) On the driver issue, I recommend to use "LibUsb-win32"

    The best way you should try is to use the precompiled image from the package. I've been told it had been compiled  using GNU-GCC with proper alignment

    Good Luck

  • Hi Duy-Ky,

    For 2), I have downloaded libusb-win32-bin-1.2.6.0.zip from http://sourceforge.net/projects/libusb-win32/files/latest/download?source=dlp.

    But still unable to install driver with StarterWare__Bulk_device.inf which in zip file and still unable to installer on driver file created by inf-wizard.exe with VID 0x1CBE and PID 0x0003.

    Please advise what to do next? Thank you.

     

     

  • Hi Duy-Ky and TI Engineers,

    I am debug the OMAPL138 evaluation board ( ZOOM L138 EVM ) and has the below debug error in below highlighted in yellow.:

    C674X_0: File Loader: Data verification failed at address 0xC0040400 Please verify target memory and memory map.

    C674X_0: GEL: File: C:\ti\OMAPL138_StarterWare_1_10_03_03\build\c674x\cgt_ccs\omapl138\evmOMAPL138\usb_dev_bulk\Debug\usb_dev_bulk.out: a data verification error occurred, file load failed.

     Please help to solve it.

     

    The detail of my set up are below:

    1. Eval kit model : OMAPL138 evaluation board ( ZOOM L138 EVM ) http://www.logicpd.com/products/system-on-modules/zoom-omap-l138-evm/

    2. Starterware version :OMAPL138_StarterWare_1_10_03_03

    3. OS : Win XP SP3

    4. CCS Version : 5.1.0.09000

    5. Gel file use for target for DSP is OMAPL138_DSP.gel and ARM processor is OMAPL138_DSP.gel

    6. Starterware project file name: usb_dev_bulk_c674x_omapl138_evmOMAPL138.

     

    May I know what is the correct gel file and how to debug it correctly?

    Thank you very much.