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.

TMS320F28069: PLL2 source clock for USB

Genius 5785 points
Part Number: TMS320F28069
Other Parts Discussed in Thread: CONTROLSUITE, TMDSDOCK28069

Hello,

There is not an external XTAL for X1/X2 pin on our board. So I want to use OSC1CLK for PLL2 of USB. I'm referring source code below which uses XTAL for PLL2.

C:\ti\controlSUITE\device_support\f2806x\v151\F2806x_examples_ccsv5\usb_dev_serial\usb_dev_serial.c

However, it doesn't pass through the polling of the PLL2LOCKS bit of PLL2STS register.

    SysCtrlRegs.PLL2CTL.bit.PLL2CLKSRCSEL = 2;
    SysCtrlRegs.PLL2CTL.bit.PLL2EN = 1;
    SysCtrlRegs.PLL2MULT.bit.PLL2MULT = 6;
    while(!SysCtrlRegs.PLL2STS.bit.PLL2LOCKS);

There is no description about INTOSC1 below, but can I set PLL2CLKSRCSEL to 0 or 1(not 2 or 3)? Also, can I get the same effect on 0 and 1?

F2806x TRM (SPRUH18F) : Table 1-27. PLL 2 Configuration (PLL 2 CTL) Register Field Descriptions
The user would need to select X1 or GPIO_XCLKIN as clock source during their initialization process.

Regards,
Kazu

  • You can set PLL2CLKSRCSEL to 0 or 1, but you'll have trouble getting USB to work. USB requires a better than 0.25% tolerance on the bit clock, and the internal oscillator isn't that good. You need a crystal for USB.
  • Hello Haun,

    Thank you for your reply. I confirmed the operation with TMDSDOCK28069 and usb_dev_serial sample software.
    C:\ti\controlSUITE\device_support\f2806x\v151\F2806x_examples_ccsv5\usb_dev_serial\usb_dev_serial.c

    In this software, PLL2CLKSRCSEL = 2 is set by SysCtrlInit after the main function. I changed the value from 2 to 0, then it passed the while statement of the PLL lock successfully.

    //    SysCtrlRegs.PLL2CTL.bit.PLL2CLKSRCSEL = 2;
        SysCtrlRegs.PLL2CTL.bit.PLL2CLKSRCSEL = 0;
        SysCtrlRegs.PLL2CTL.bit.PLL2EN = 1;
        SysCtrlRegs.PLL2MULT.bit.PLL2MULT = 6;
        while(!SysCtrlRegs.PLL2STS.bit.PLL2LOCKS);

    Adam Haun said:
    You can set PLL2CLKSRCSEL to 0 or 1, but you'll have trouble getting USB to work. USB requires a better than 0.25% tolerance on the bit clock, and the internal oscillator isn't that good. You need a crystal for USB.

    Do you mean that INTOSC1 is not appropriate for USB operation even if it pass the while statement of PLL2 lock successfully when INTOSC1 is selected.

    Regards,
    Kazu

  • "Do you mean that INTOSC1 is not appropriate for USB operation even if it pass the while statement of PLL2 lock successfully when INTOSC1 is selected."


    Correct. Even with temperature trim, I don't think you can get better than 1% tolerance on the internal oscillator. You might be able to use it at room temperature, but not reliably. It will likely fail at high temperatures.