Hi!
I have a problem with the AP32 using a 32.768 KHz xtal. I´m using the values suggested in DE001 errata (10M, 330K and 15pF). I have oscillations with all pieces, but in several cases (a hig percentage) the PLL does not rise its LOCK flag.
The initialization of the PLL is as follows:
PCTL_BCS=0;
PCTL_PLLON=0;
PCTL=0x02; //P=0, E=2
PMSH=3;
PMSL=0xd1; //N=3d1
PMRS=0x28; //L=40
PMDS=1; //R=1
PBWC_AUTO=1;
PCTL_PLLON=1;
while (!PBWC_LOCK);
PCTL_BCS=1; //System clock = VCO
When I comment the wait for LOCK bit, the 100% of pieces works fine.
Sometimes, the program passes the while loop when I touch the xtal or pin 11 with a finger..
What can I do? Try other values for the osc capacitors?
Not to wait for LOCK bit?
Thankfully,
Ernesto.