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.

TMS320F28069M USB Question

Other Parts Discussed in Thread: TMS320F28069, CONTROLSUITE

I've designed a USB interface for the TMS320f28069, and have just realised that the available libraries may not actually use USB, instead they use the UART provided by the fdti IC on the launchpads. This is not very useful to me as i'm trying to avoid having to use add additional IC's to my board. 
It is possible however that I simply didn't design the USB interface successfully, for example:

I connected this directly to the microcontrollers D+ and D- pins. I did not add a high-speed or low speed pull-up as the user-guide implied that it was included (on "Figure 17-2. USB Scheme") and the datasheet didn't say much about it. The device is not powered from USB and currently the USB_STATE isn't needed.

If I run the example files including the USB bootloader the device is not recognised on my computer and I get a code 41.


If anybody has any ideas what the issue could be I'm all ears, otherwise any additional USB examples that don't use UART to USB.

  • Hi David,

    Did you refer F29069 TRM from it Homepage under Technical Documents?

    In that manual they've clearly mentioned about the interface:

    Regards,

    Gautam

  • Yes I did refer to that diagram, please see my original post, I actually talked about it in the post :]

    As there is no example code I have found for this interface. There is a lot of example code for the Launchpad, however its USB-DP and DM are not connected to the USB.

  • David Ledger said:
    As there is no example code I have found for this interface.

    I guess you got the example codes wrong.They're pretty much meant for pure USB communication!

    If you go through usb_dev_bulk, its meant for USB bulk transfer (no ftdi required). FTDI based communication ie from SCI0 is used only to display the communication status of USB communication. Also, for these USB examples you very much need USB drivers that are available here: C:\ti\controlSUITE\device_support\f2806x\v141\MWare\windows_drivers

    Please go through the USB docs present here: C:\ti\controlSUITE\device_support\f2806x\v141\doc

    Regards,

    Gautam

  • Hello,

    I have done as you described, actually I tried this earlier. But couldn't figure out why it wasn't working. I noticed that on the launchpad for this micro the usb wasn't even connected so assumed the code wouldn't work.

    If the example bulk code is meant to work after i setup the clock why do I get a code 41 when I plug in device. I have attempted to install drivers but nothing.

    void SysCtrlInit(void)
    {
    
        EALLOW;
        //Disable Watchdog
        SysCtrlRegs.WDCR = 0x68;
    
        //Setup Clock
        //8MHz ->PLL->80MHz->C28
        //      ->PLL2->120MHz->USB
      //  SysCtrlRegs
        DevEmuRegs.DEVICECNF.bit.SYSCLK2DIV2DIS = 0;
        SysCtrlRegs.CLKCTL.bit.XCLKINOFF = 1;
        SysCtrlRegs.CLKCTL.bit.XTALOSCOFF = 0;
        SysCtrlRegs.CLKCTL.bit.OSCCLKSRC2SEL = 0;
        SysCtrlRegs.CLKCTL.bit.OSCCLKSRCSEL = 1;
    
        while(SysCtrlRegs.PLLSTS.bit.MCLKSTS);
        SysCtrlRegs.PLLSTS.bit.DIVSEL	= 0;		//4 = 2MHz
        SysCtrlRegs.PLLSTS.bit.MCLKOFF 	= 1;		//
        SysCtrlRegs.PLLCR.bit.DIV 		= 10;		//	= 20MHz
        while(!SysCtrlRegs.PLLSTS.bit.PLLLOCKS);
        SysCtrlRegs.PLLSTS.bit.MCLKOFF 	= 1;		//Enable Clk
        SysCtrlRegs.PLLSTS.bit.DIVSEL 	= 3;		//80MHz
    
    
        SysCtrlRegs.PLL2CTL.bit.PLL2CLKSRCSEL 	= 2;
        SysCtrlRegs.PLL2CTL.bit.PLL2EN 			= 1;
        SysCtrlRegs.PLL2MULT.bit.PLL2MULT		= 15;
        while(!SysCtrlRegs.PLL2STS.bit.PLL2LOCKS);
    
        //Enable USB Clock
        SysCtrlRegs.PCLKCR3.bit.USB0ENCLK = 1;
        //Enable PHY
        GpioCtrlRegs.GPACTRL2.bit.USB0IOEN = 1;
    
        EDIS;
    }
  • Turns out my 10R resistors were 10K :(. Now i can see data lol thanks for steering me away from usb firmware issues.
  • Ahh.... that's silly :)
    Anyways, great that you got it working!

    Goodluck & Regards,
    Gautam