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.

TMS320F28375S: TMS320F28375S USB Driver installation

Part Number: TMS320F28375S
Other Parts Discussed in Thread: C2000WARE

Respected sir,

                 I am trying to implement usb_dev_serial example. For that i need to install drivers given by TI in C2000ware. But i am not in a position to generate Software Publisher Certificate  from CA. So is there any other way to implement USB on TMS320F28375S??

Regards,

Digvijay

  • Hi Digvijay,

    Have you tested your custom board's USB communication by running the USB bootloader per Sal's suggestion in the previous thread? I think this is a good step to take to verify that your device's USB is configured correctly.

    Please look at the example within C2000ware:

    C:\ti\c2000\C2000Ware_1_00_06_00\utilities\flash_programmers\usb_flash_programmer

    Best,
    Kevin

  • Hi

                    Thanks for the reply.

                      I was able to sign in and install the drivers. Also i have implemented the usb_dev_serial_cpu01 example. I have one doubt though.

    From where i can set USB Data rate(12 MBps or 1.25 Mbps)??

    Can it be set from software or is it depending upon hardware??

    Regards,

    Digvijay

  • Hi Digvijay,

    If you review the register descriptions of the USB section within the device Technical Reference Manual you can look up what registers/bits affect the USB speed (low/full).

    http://www.ti.com/lit/spruhx5

    There are register bits that can force Low or Full speed modes. I believe the desired operating mode will depend on other USB devices being communicated with and there are register bits for detecting low or high speed ports.

    Best,
    Kevin
  • Respected sir/madam,

                                  Please reply ASAP.  It is urgent.

    I was able to implement the usb_dev_serial example. I have integrated this example into my code. The are no errors while building my code. But while implementing the example there is certain issue.

    When i dump the usb_dev_serial example using debugger and after that immediately dump my code using debugger , my code works fine. But  when i try to dump my code separately it does not work. Also when i power cycle the controller with my code, it does not work. The message that USB device has malfunctioned pops up.

    So what could be the reason??

    I have attached the snaps of pop up and device manager.

    Regards,

    Digvijay

     

  • Hi,

            i have attached my 2837xD_FLASH_lnk_cpu1.cmd   file.  Please reply asap.


    MEMORY
    {
    PAGE 0 :  /* Program Memory */
              /* Memory (RAM/FLASH) blocks can be moved to PAGE1 for data allocation */
              /* BEGIN is used for the "boot to Flash" bootloader mode   */

       BEGIN               : origin = 0x080000, length = 0x000002                        //80002
       RAMM0               : origin = 0x000122, length = 0x0002DE                        //400
       RAMD0               : origin = 0x00B000, length = 0x000800                        //B800
       RAMLS0           : origin = 0x008000, length = 0x002800
    //   RAMLS0              : origin = 0x008000, length = 0x000800
    //   RAMLS1              : origin = 0x008800, length = 0x000800
    //   RAMLS2              : origin = 0x009000, length = 0x000800
    //   RAMLS3              : origin = 0x009800, length = 0x000800
    //   RAMLS4              : origin = 0x00A000, length = 0x000800
       RAMGS14          : origin = 0x01A000, length = 0x001000
       RAMGS15          : origin = 0x01B000, length = 0x001000
       RESET               : origin = 0x3FFFC0, length = 0x000002
       
       /* Flash sectors */
       FLASH_A_N          : origin = 0x080002, length = 0x03FFFE
    //   FLASHA           : origin = 0x080002, length = 0x001FFE    /* on-chip Flash */
    //   FLASHB           : origin = 0x082000, length = 0x002000    /* on-chip Flash */
    //   FLASHC           : origin = 0x084000, length = 0x002000    /* on-chip Flash */
    //   FLASHD           : origin = 0x086000, length = 0x002000    /* on-chip Flash */
    //   FLASHE           : origin = 0x088000, length = 0x008000    /* on-chip Flash */
    //   FLASHF           : origin = 0x090000, length = 0x008000    /* on-chip Flash */
    //   FLASHG           : origin = 0x098000, length = 0x008000    /* on-chip Flash */
    //   FLASHH           : origin = 0x0A0000, length = 0x008000    /* on-chip Flash */
    //   FLASHI           : origin = 0x0A8000, length = 0x008000    /* on-chip Flash */
    //   FLASHJ           : origin = 0x0B0000, length = 0x008000    /* on-chip Flash */
    //   FLASHK           : origin = 0x0B8000, length = 0x002000    /* on-chip Flash */
    //   FLASHL           : origin = 0x0BA000, length = 0x002000    /* on-chip Flash */
    //   FLASHM           : origin = 0x0BC000, length = 0x002000    /* on-chip Flash */
    //    FLASHN           : origin = 0x0BE000, length = 0x002000    /* on-chip Flash */

    PAGE 1 : /* Data Memory */
             /* Memory (RAM/FLASH) blocks can be moved to PAGE0 for program allocation */

       BOOT_RSVD       : origin = 0x000002, length = 0x000120     /* Part of M0, BOOT rom will use this for stack */
       RAMM1           : origin = 0x000400, length = 0x000400     /* on-chip RAM block M1 */
       RAMD1           : origin = 0x00B800, length = 0x000800

       RAMLS5          : origin = 0x00A800, length = 0x000800

       RAMGS0          : origin = 0x00C000, length = 0X014000
     //  RAMGS0      : origin = 0x00C000, length = 0x001000
     //  RAMGS1      : origin = 0x00D000, length = 0x001000
     //  RAMGS2      : origin = 0x00E000, length = 0x001000
     //  RAMGS3      : origin = 0x00F000, length = 0x001000
     //  RAMGS4      : origin = 0x010000, length = 0x001000
     //  RAMGS5      : origin = 0x011000, length = 0x001000
     //  RAMGS6      : origin = 0x012000, length = 0x001000
     //  RAMGS7      : origin = 0x013000, length = 0x001000
     //  RAMGS8      : origin = 0x014000, length = 0x001000
     //  RAMGS9      : origin = 0x015000, length = 0x001000
     //  RAMGS10     : origin = 0x016000, length = 0x001000
     //  RAMGS11     : origin = 0x017000, length = 0x001000
     //  RAMGS12     : origin = 0x018000, length = 0x001000
     //  RAMGS13     : origin = 0x019000, length = 0x001000

       
       CPU2TOCPU1RAM   : origin = 0x03F800, length = 0x000400
       CPU1TOCPU2RAM   : origin = 0x03FC00, length = 0x000400
    }


    SECTIONS
    {
       /* Allocate program areas: */
       .cinit              : > FLASH_A_N      PAGE = 0, ALIGN(4)
       .pinit              : > FLASH_A_N,     PAGE = 0, ALIGN(4)
       .text               : >> FLASH_A_N      PAGE = 0, ALIGN(4)
       codestart           : > BEGIN       PAGE = 0, ALIGN(4)

       /* Allocate uninitalized data sections: */
       .stack              : > RAMM1        PAGE = 1
       .ebss               : >> RAMLS5 | RAMGS0        PAGE = 1
       .esysmem            : > RAMLS5       PAGE = 1
       .cio                : > RAMLS5     PAGE = 1

       /* Initalized sections go in Flash */
       .econst             : >> FLASH_A_N      PAGE = 0, ALIGN(4)
       .switch             : > FLASH_A_N      PAGE = 0, ALIGN(4)

       .reset              : > RESET,     PAGE = 0, TYPE = DSECT /* not used, */

       Filter_RegsFile     : > RAMGS0,       PAGE = 1

       SHARERAMGS0        : > RAMGS0,        PAGE = 1
       SHARERAMGS1        : > RAMGS0,        PAGE = 1
       ramgs0           : > RAMGS0,     PAGE = 1
       ramgs1           : > RAMGS0,     PAGE = 1

    #ifdef __TI_COMPILER_VERSION__
        #if __TI_COMPILER_VERSION__ >= 15009000
        .TI.ramfunc : {} LOAD = FLASH_A_N,
                             RUN = RAMLS0,
                             LOAD_START(_RamfuncsLoadStart),
                             LOAD_SIZE(_RamfuncsLoadSize),
                             LOAD_END(_RamfuncsLoadEnd),
                             RUN_START(_RamfuncsRunStart),
                             RUN_SIZE(_RamfuncsRunSize),
                             RUN_END(_RamfuncsRunEnd),
                             PAGE = 0, ALIGN(4)
        #else
       ramfuncs            : LOAD = FLASHD,
                             RUN = RAMLS0,
                             LOAD_START(_RamfuncsLoadStart),
                             LOAD_SIZE(_RamfuncsLoadSize),
                             LOAD_END(_RamfuncsLoadEnd),
                             RUN_START(_RamfuncsRunStart),
                             RUN_SIZE(_RamfuncsRunSize),
                             RUN_END(_RamfuncsRunEnd),
                             PAGE = 0, ALIGN(4)
        #endif
    #endif

       /* The following section definitions are required when using the IPC API Drivers */
        GROUP : > CPU1TOCPU2RAM, PAGE = 1
        {
            PUTBUFFER
            PUTWRITEIDX
            GETREADIDX
        }

        GROUP : > CPU2TOCPU1RAM, PAGE = 1
        {
            GETBUFFER :    TYPE = DSECT
            GETWRITEIDX :  TYPE = DSECT
            PUTREADIDX :   TYPE = DSECT
        }

       /* Allocate IQ math areas: */
       IQmath            : > FLASH_A_N, PAGE = 0, ALIGN(4)            /* Math Code */
       IQmathTables        : > FLASH_A_N, PAGE = 0, ALIGN(4)

       /* The following section definition are for SDFM examples */
       Filter1_RegsFile : > RAMGS0,    PAGE = 1, fill=0x1111
       Filter2_RegsFile : > RAMGS0,    PAGE = 1, fill=0x2222
       Filter3_RegsFile : > RAMGS0,    PAGE = 1, fill=0x3333
       Filter4_RegsFile : > RAMGS0,    PAGE = 1, fill=0x4444
       Difference_RegsFile : >RAMGS0,     PAGE = 1, fill=0x3333
    }

    /*
    //===========================================================================
    // End of file.
    //===========================================================================
    */

    Regards,

    Digvijay

  • Hi Digvijay,

    I'm not clear what you mean by the below:

    When i dump the usb_dev_serial example using debugger and after that immediately dump my code using debugger , my code works fine. But  when i try to dump my code separately it does not work. Also when i power cycle the controller with my code, it does not work. The message that USB device has malfunctioned pops up.

    I'm guessing you mean when you run your application from flash and power cycle the board the USB is not appearing configured.

    I would first suggest checking your boot mode selection pins. After programming your device for standalone flash operation make sure you set the boot mode to one that will boot from flash, Get Mode defaults to running from flash so try that. Do this before power cycling the device:

    If that doesn't fix this then maybe you're not allocating flash properly or you need to copy functions from flash to run from RAM, like below:

    #ifdef _FLASH
        memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
    #endif
    

    best,

    Kevin

  • Respected sir,

                              Device boot mode is not the problem. Also i tried copying function from flash to ram, but it does not work. So only option left is memory allocation of flash. I tried changing the 2837xD_FLASH_lnk_cpu1.cmd  file. But i am not able to figure out which part  to change. It is giving errors like memory overlap. I have copied the 2837xD_FLASH_lnk_cpu1.cmd into previous reply.

    So can you please point me to a part , which i need to change to get USB working from flash??

    If possible please share .cmd file for USB from flash.

    Regards,

    Digvijay

  • Hi Digvijay,

    Please try using the 2837xS_Generic_FLASH_lnk.cmd file within C2000ware. This is the one the example used for FLASH config by default. The one you're referencing is for the xD not xS.

    C:\ti\c2000\C2000Ware_1_00_06_00\device_support\f2837xs\common\cmd

    Best,
    Kevin
  • Respected sir,

                   As you suggested i tried using  2837xS_Generic_FLASH_lnk.cmd     file with USB_dev_serial example for single core. But it is giving following errors when i use memcpy() and initflash_bank0() functions.

                   So what could be reason??

  • Hi Digvijay,

    That address location is the ITRAP ISR in BOOT ROM. Something went wrong.

    Have you made any changes to the example or linker command file? I don't believe there are any issues with this example out of the box, I tried the dual core version and it seems to work fine. Try using the cmd file provided below if so:

    5315.2837xS_Generic_FLASH_lnk.txt
    MEMORY
    {
    PAGE 0 :  /* Program Memory */
              /* Memory (RAM/FLASH) blocks can be moved to PAGE1 for data allocation */
              /* BEGIN is used for the "boot to Flash" bootloader mode   */
    
       BEGIN           	: origin = 0x080000, length = 0x000002
       RAMM0           	: origin = 0x000122, length = 0x0002DE
       RAMD0           	: origin = 0x00B000, length = 0x000800
       RAMLS0          	: origin = 0x008000, length = 0x000800
       RAMLS1          	: origin = 0x008800, length = 0x000800
       RAMLS2      		: origin = 0x009000, length = 0x000800
       RAMLS3      		: origin = 0x009800, length = 0x000800
       RAMLS4      		: origin = 0x00A000, length = 0x000800
       RESET           	: origin = 0x3FFFC0, length = 0x000002
    
       /* Flash sectors */
       FLASHA           : origin = 0x080002, length = 0x001FFE	/* on-chip Flash */
       FLASHB           : origin = 0x082000, length = 0x002000	/* on-chip Flash */
       FLASHC           : origin = 0x084000, length = 0x002000	/* on-chip Flash */
       FLASHD           : origin = 0x086000, length = 0x002000	/* on-chip Flash */
       FLASHE           : origin = 0x088000, length = 0x008000	/* on-chip Flash */
       FLASHF           : origin = 0x090000, length = 0x008000	/* on-chip Flash */
       FLASHG           : origin = 0x098000, length = 0x008000	/* on-chip Flash */
       FLASHH           : origin = 0x0A0000, length = 0x008000	/* on-chip Flash */
       FLASHI           : origin = 0x0A8000, length = 0x008000	/* on-chip Flash */
       FLASHJ           : origin = 0x0B0000, length = 0x008000	/* on-chip Flash */
       FLASHK           : origin = 0x0B8000, length = 0x002000	/* on-chip Flash */
       FLASHL           : origin = 0x0BA000, length = 0x002000	/* on-chip Flash */
       FLASHM           : origin = 0x0BC000, length = 0x002000	/* on-chip Flash */
       FLASHN           : origin = 0x0BE000, length = 0x002000	/* on-chip Flash */
    
    PAGE 1 : /* Data Memory */
             /* Memory (RAM/FLASH) blocks can be moved to PAGE0 for program allocation */
    
       BOOT_RSVD       : origin = 0x000002, length = 0x000120     /* Part of M0, BOOT rom will use this for stack */
       RAMM1           : origin = 0x000400, length = 0x000400     /* on-chip RAM block M1 */
       RAMD1           : origin = 0x00B800, length = 0x000800
    
       RAMLS5      : origin = 0x00A800, length = 0x000800
    
       RAMGS0      : origin = 0x00C000, length = 0x001000
       RAMGS1      : origin = 0x00D000, length = 0x001000
       RAMGS2      : origin = 0x00E000, length = 0x001000
       RAMGS3      : origin = 0x00F000, length = 0x001000
       RAMGS4      : origin = 0x010000, length = 0x001000
       RAMGS5      : origin = 0x011000, length = 0x001000
       RAMGS6      : origin = 0x012000, length = 0x001000
       RAMGS7      : origin = 0x013000, length = 0x001000
       RAMGS8      : origin = 0x014000, length = 0x001000
       RAMGS9      : origin = 0x015000, length = 0x001000
       RAMGS10     : origin = 0x016000, length = 0x001000
       RAMGS11     : origin = 0x017000, length = 0x001000
    }
    
    SECTIONS
    {
       /* Allocate program areas: */
       .cinit              : > FLASHB      PAGE = 0, ALIGN(4)
       .pinit              : > FLASHB,     PAGE = 0, ALIGN(4)
       .text               : >> FLASHB | FLASHC | FLASHD | FLASHE      PAGE = 0, ALIGN(4)
       codestart           : > BEGIN       PAGE = 0, ALIGN(4)
    
       /* Allocate uninitalized data sections: */
       .stack              : > RAMM1        PAGE = 1
       .ebss               : >> RAMLS5 | RAMGS0 | RAMGS1       PAGE = 1
       .esysmem            : > RAMLS5       PAGE = 1
       .cio                : > RAMLS5     PAGE = 1
    
       /* Initalized sections go in Flash */
       .econst             : >> FLASHF | FLASHG | FLASHH      PAGE = 0, ALIGN(4)
       .switch             : > FLASHB      PAGE = 0, ALIGN(4)
    
       .reset              : > RESET,     PAGE = 0, TYPE = DSECT /* not used, */
    
    #ifdef __TI_COMPILER_VERSION__
       #if __TI_COMPILER_VERSION__ >= 15009000
        .TI.ramfunc : {} LOAD = FLASHD,
                             RUN = RAMLS0 | RAMLS1 | RAMLS2 |RAMLS3,
                             LOAD_START(_RamfuncsLoadStart),
                             LOAD_SIZE(_RamfuncsLoadSize),
                             LOAD_END(_RamfuncsLoadEnd),
                             RUN_START(_RamfuncsRunStart),
                             RUN_SIZE(_RamfuncsRunSize),
                             RUN_END(_RamfuncsRunEnd),
                             PAGE = 0, ALIGN(4)
       #else
       ramfuncs            : LOAD = FLASHD,
                             RUN = RAMLS0 | RAMLS1 | RAMLS2 |RAMLS3,
                             LOAD_START(_RamfuncsLoadStart),
                             LOAD_SIZE(_RamfuncsLoadSize),
                             LOAD_END(_RamfuncsLoadEnd),
                             RUN_START(_RamfuncsRunStart),
                             RUN_SIZE(_RamfuncsRunSize),
                             RUN_END(_RamfuncsRunEnd),
                             PAGE = 0, ALIGN(4)   
       #endif
    #endif
    
       ramgs0           : > RAMGS0,    PAGE = 1
       ramgs1           : > RAMGS1,    PAGE = 1
    
       /* The following section definitions are for SDFM examples */
       Filter1_RegsFile : > RAMGS1,	PAGE = 1, fill=0x1111
       Filter2_RegsFile : > RAMGS2,	PAGE = 1, fill=0x2222
       Filter3_RegsFile : > RAMGS3,	PAGE = 1, fill=0x3333
       Filter4_RegsFile : > RAMGS4,	PAGE = 1, fill=0x4444
       Difference_RegsFile : >RAMGS5, 	PAGE = 1, fill=0x3333
    }
    
    /*
    //===========================================================================
    // End of file.
    //===========================================================================
    */
    

    Maybe there's something wrong with your board. Have you tried running any of the other example projects in C2000ware?

    Best,

    KEvin

  • Respected sir,

                     

    Kevin Allen18 said:
    Have you made any changes to the example or linker command file?

                      I have not made any changes to the example or linker file.

                       Also there is one more observation.   The program goes into ControlHandler function but it does not go into the    USB_EVENT_CONNECTED    case.

    So problem is related to ui32Event. But i am not able to figure out from where ui32Event gets its value??

    uint32_t
    ControlHandler(void *pvCBData, uint32_t ui32Event,
    uint32_t ui32MsgValue, void *pvMsgData)
    {
    uint32_t ui32IntsOff;

    //
    // Which event are we being asked to process?
    //
    switch(ui32Event)
    {
    //
    // We are connected to a host and communication is now possible.
    //
    case USB_EVENT_CONNECTED:                                                          //PROGRAM SHOULD GO INTO THIS CASE TO WORK USB PROPERLY.
    g_bUSBConfigured = true;

    //
    // Flush our buffers.
    //
    USBBufferFlush(&g_sTxBuffer);
    USBBufferFlush(&g_sRxBuffer);

    //
    // Tell the main loop to update the display.
    //
    ui32IntsOff = IntMasterDisable();
    g_pcStatus = "Connected";
    g_ui32Flags |= COMMAND_STATUS_UPDATE;
    if(!ui32IntsOff)
    {
    IntMasterEnable();
    }
    break;

    //
    // The host has disconnected.
    //
    case USB_EVENT_DISCONNECTED:
    g_bUSBConfigured = false;
    ui32IntsOff = IntMasterDisable();
    g_pcStatus = "Disconnected";
    g_ui32Flags |= COMMAND_STATUS_UPDATE;
    if(!ui32IntsOff)
    {
    IntMasterEnable();
    }
    break;

    //
    // Return the current serial communication parameters.
    //
    case USBD_CDC_EVENT_GET_LINE_CODING:
    // GetLineCoding(pvMsgData);
    break;

    //
    // Set the current serial communication parameters.
    //
    case USBD_CDC_EVENT_SET_LINE_CODING:
    // SetLineCoding(pvMsgData);
    break;

    //
    // Set the current serial communication parameters.
    //
    case USBD_CDC_EVENT_SET_CONTROL_LINE_STATE:
    SetControlLineState((uint16_t)ui32MsgValue);
    break;

    //
    // Send a break condition on the serial line.
    //
    case USBD_CDC_EVENT_SEND_BREAK:
    SendBreak(true);
    break;

    //
    // Clear the break condition on the serial line.
    //
    case USBD_CDC_EVENT_CLEAR_BREAK:
    SendBreak(false);
    break;

    //
    // Ignore SUSPEND and RESUME for now.
    //
    case USB_EVENT_SUSPEND:
    case USB_EVENT_RESUME:
    break;

    //
    // We don't expect to receive any other events. Ignore any that show
    // up in a release build or hang in a debug build.
    //
    default:
    #ifdef DEBUG
    while(1);
    #else
    break;
    #endif

    }

    return(0);
    }

  • Respected sir,

                      The issues has been sorted. I had to add _FLASH in predefined symbols to get flash linker working. For USB the problem was related to AUXILIARY CLOCK. After initializing the auxiliary clock properly the issue got resolved.

                       Thanks for all the help.

    Regards,

    Digvijay.