Clock Derivation
Listing 14-4. PLL Programming Example 2
ustat2 = dm(PMCTL);
bit clr ustat2 PLLM63|PLLD8;
bit set ustat2 PLLBP | PLLD4 |PLLM16; /* set a multiplier of 16
ustat2 = dm(PMCTL);
waiting_loop:
r0 = 4096;
lcntr = r0, do pllwait until lce;
pllwait: nop;ustat2 = dm(PMCTL);
bit clr ustat2 PLLBP;
dm(PMCTL) = ustat2;
ustat2 = dm(PMCTL);
bit set ustat2 DIVEN;
dm(PMCTL) = ustat2;
Listing 14-5
is a PLL programming example in C.
Listing 14-5. PLL Programming Sequence (C)
pmctlsetting= *pPMCTL;
pmctlsetting &= ~(0xFF); /* Clear */
/* CLKIN= 24.576 MHz, Multiplier= 27, Divisor= 2,
CCLK_SDCLK_RATIO 2. */
14-18
/* wait for PLL to lock at new rate
(requirement for modifying multiplier only) */
/* take PLL out of Bypass*/
/* Enable the DIVEN bit, PLL is now at
CLKIN*4 (CoreCLK = CLKIN * M/N = CLKIN* 16/4) */
ADSP-21368 SHARC Processor Hardware Reference
/* clear old multiplier and
divisor*/
and a divider of 4 and
enable Bypass mode*/
Need help?
Do you have a question about the SHARC ADSP-21368 and is the answer not in the manual?