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.

piccolo tmx320f28027 clock source changing issue



Non English-speaking writer here, beware! lol

My noob attempts correctly change clock source on a piccolo tmx320f28027 uP from a default
intern. OSC1 to an ext. 20MHZ osc. in a couple of random examples from DSP2802x_HeaderFiles
had failed, so help needed. thank you!

uP works excellent on IntOSC1 and an ext.osc. is running exactly 20 MHz
(no doubt, can see that with a tek scope).

My settings in DSP2802x_Examples.h:
#define DSP28_DIVSEL   2    // 120/2=60MHz
#define DSP28_PLLCR    6    // 20*6=120MHz
#define CPU_RATE   16.667L     // 60MHz CPU clock speed


Minor alteration in DSP2802x_SysCtrl.c external clock selection:
       //IntOsc1Sel();
       ExtClkSel ();
compilation... and.. uP stops in a very next func. call:
InitPll(DSP28_PLLCR,DSP28_DIVSEL);


void InitPll(Uint16 val, Uint16 divsel){
    ........
    if(SysCtrlRegs.PLLSTS.bit.MCLKSTS != 0){
    ........
    ........
          asm("        ESTOP0");   <--------------uP stops here
    }
}

I am reading "TMS320F2802x Piccolo System Control and Interrupts Reference Guide"   right now .
"Chapter 3 – Clocking" ....lost in info - no insight.

  • The default path for XCLKIN is GPIO38, if you have XCLKIN on GPIO19 you'll need to change the  SysCtrlRegs.XCLK.bit.XCLKINSEL bit to "1" to select GPIO19 prior to switch over.

    Another thing to look at is by default the InitPLL() function we re-select Internal OSC 1 if not commented out and re-compiled. 

    Best,

    Matthew