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.