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 the example of usb function on dm6437?

         I am doing the usb on dm6437, and have downloaded the the pspdriver's example of tusb6020, but it can not work, the USB disk has no response after I plugin. And when I called the read or write procedure, it will be halted here as follows in the function OTGC_FsDeviceRead of the file otg_hfi.c

    /* TODO: a sector is FS_SEC_SIZE */
    eStatus = pDevice->pfReadDevice(pDevice->pPrivateData, dwSector, 0,
    dwNumSectors, (Uint8*)pBuffer, OTGC_FsTransferComplete, FALSE);

 

       It's seem that the example is not same with the one refered by the document slau242a.pdf. So how can I get the example refered in slau242a.pdf, and where I can get more information about tusb6020. With the tusb6020.pdf I can not debug the example. There are not registers nformation in it.

  • Unfortunately I do not have this particular daughter card myself so I have not had a chance to try it but my first guess would be not setting the VID/PID of the USB mass storage device you are using in the driver before rebuilding the driver, just because this seems to be the only odd step in the build and usage process, basically you may want to verify you are following the steps in C:\Program Files\Texas Instruments, Inc\TUSB6020 OTG Source Installer\Readme.doc.

    I agree that the SLAU242 example is not the same and that it does not appear to come with the downloadable software package, I will have to take a look and see if this is actually available somewhere, it is possible that the functionality was just put into the PSP driver and the screen shots from SLAU242 are simply out of date.

  • As Bernie Thompson stated on the last post, the problem that you are having is likely to be because the VID/PID of the thumb drive that you're using is not on the Target Peripheral List (TPL). Change the VID and PID on the 'msd_mapi.c' file that is located in C:\dvsdk_1_00_01_02\PSP_DM6437_0_6_1\pspdrivers\TUSB6020_OTG\DM6437\bios\dm6437_evm\src\drivers\msd. Almost at the beginning of the file on line: USBC_TARGET_VID, 0x2d, 0x15, USBC_TARGET_PID, 0x38, 0x23, USBC_TARGET_ACCEPT. Rebuild your code.

    Since I have already tested this on my board and it worked fine with me this should be the problem. Also, please connect your device before running the driver to make sure that the device gets enumerated.

  • i found the example is not same with the one refered by the document slau242a.pdf.  the example is not work fine .how can I get the example refered in slau242a.pdf?

  • I am tryng to run the example of usb, but I have some questions. I have installed dvsdk 1_01_00_15, but the sample is under  dvsdk 1_00_01_02 with other bios version. I am  porting the sample under environment of dvsdk1_01_00_15. Now I am building correctly TUSB6020_OTG_USB_LIB.pjt, my last step will be update file "psp_bios_main_sample.c" with call to USB functions contained in original sample version. Is it a good way or do you suggest me to get older version of dvsdk? If so, where I can find dvsdk 1_00_01_02?  

    Thanks

    Fabrizio

  • You need not get older version of dvsdk, my dvsdk is same as yours, it works very well now.

  • zhenhong can you tell me your mail? i have some question for the prj.can you help me?

  • Hi zhenhong,

    thanks for your reply.

    Now I have ported the sample under dvsdk 1_01_00_15. I have a question: do you have changed PID and VID values located in "msd_mapi.c" file ( USBC_TARGET_VID, 0x2d, 0x15, USBC_TARGET_PID, 0x38, 0x23, USBC_TARGET_ACCEPT) ? When you link PC to tusb6020 board, what kind of device is recognized by PC? I ask this because the sample seems to run correctly, I see message on Hyperterminal via serial port, but PC don't recognize USB device.

    Thanks

    Fabrizio

  • Hi Fabrizio,

            Yes, I have changed the PID and VID when I plugin a USB disk,  it said that I use the board as a USB host, as for using the board as a B device, I have not known if the project could work. If you run it well as a B device, please tell me. :)

           Thanks

     

    ZhenHong

  • hi, I changed the PID and VID but when I  plug in a usb disk  no message in my Hyperterminal.only

    serial port message:

    EDMA3: Starting EDMA3 Test memory to memory copy

    EDMA3 : edma3MemToMemCpytest() passed

    EDMA3 : End EDMA3 Test memory to memory copy

    Please press "h" to list available actions?

    [TUSB]>
    Please Select an Action
    "1" to start a USB Session


    *** WARNING ***
    This application knows nothing about filesystems,
    so it WILL happily overwrite disk contents!
    *** END WARNING ***
    "2" to start Block Data Read/Write Test

    but when i select2 the system is halt.

    in my ccs trace log message:

    101   VLYNQ link found!

    102   VLYNQ link found! using 0x4 TX pins, 0x4 RX pins.

    103  TUSB6020 USB OTG Driver

    104   Version 1.00.01 DSP BIOS

    105  Core version is 1.400

    106  USBC_AB_IDLE

     

  • Hi,

    I see all that you see in Hyperterminal window and in CCS log mesage window, but I never have plugged an usb disk. In my application I need that tusb6020 act as a USB device, not host. In file  C:\Program Files\Texas Instruments, Inc\TUSB6020 OTG Source Installer\Readme.doc. is reported that if TUSB6020 is connected as a “B” device, no human intervention need the driver will cause the TUSB6020 to appear as a 2 Meg. RAM drive, but I don't see nothing. Is there anyone that has used tusb6020  as USB device?

    Thanks

    Fabrizio

  • to zhenhong:

     Are you only change the pid and vid? my USB disk VID is 0x13FE PID is 0x1d00, I changed it in my project.

    :static const Uint8 OTGC_aMsdPeripheralList[] =
    {
        USBC_TARGET_VID, 0xfe, 0x13, USBC_TARGET_PID, 0x00, 0x1d, USBC_TARGET_ACCEPT
    };

    rebulid the project.

    but  when I plug in the USB disk,nothing happened, when i select 2 in Hyperterminal the system is halt.

    can tell me what i can do for the project source?

  • hi

    well , you should change the elements in OTGC_aMsdPeripheralList, when you use it as diffrent usb device, as for usb disk, it's a MASS_STORAGE device, so you should change it as a MASS_SOTRAGE device. it will be ok.

  •  

    NOW PC find  the board as a b-device。

     

    But i can not write the usb disk.

     

  • Hi Liang Ruan,

    please, can you tell me how do yo have done to force your PC to see the board as a B device? Do you have changed PID e/o VID from original sample source files?

    Thanks

    Fabrizio

     

  • to Fabrizio:

            NOT changed any source code! noly  changed the switch J14 in your TUSB6020PDK board.when the J14 is link to groud the board as a a-device.contrarily! it is a b-device.   see "TUSB6020 Evaluation Model (EVM) Compatible With TMS320C6437 DaVinci LC EVM.pdf"  P12.

  • Hi Liang Ruan,

    thank for your post.

    I have verified that in my board  J14 is open, signal ID is not connected to ground, then tusb6020 must be a b-device, but when I connect a b cable to PC doesn't happen nothing. First, I run application on Da Vinci, and I see message on serial port. After I link usb cable. I have tried to reverse order of my operations but without results. Do you think that my operations are correct?

    Fabrizio