Discussion Forum

PLL Configuration

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Harish G
Posted
19-Nov-2008 10:28 GMT
Toolset
ARM
New! PLL Configuration

Hi

We are using LPC2366 controller

When we configure the Internal RC oscillator(4 MHZ) for the PLL as shown below

Main OScillator = disabled
PLL source = Internal RC oscillator(4 MHZ )
M = 35
N = 1
so FCCO = 280MHZ

and Cpu clock frequency is 56MHZ
When we enter into the debug mode
the execution is not coming out of the PLL Lock sequence

; Wait until PLL Locked
PLL_Loop LDR R3, [R0, #PLLSTAT_OFS] ANDS R3, R3, #PLLSTAT_PLOCK BEQ PLL_Loop

Could you please guide us

Read-Only
Author
Per Westermark
Posted
19-Nov-2008 10:44 GMT
Toolset
ARM
New! RE: PLL Configuration

Are you running with recent versions of the simulator?

When the support for LPC23xx was introduced, the Keil tools had a problem that they didn't correctly simulated the PLL and always got stuck waiting for the PLL synchronization.

Read-Only
Author
Harish G
Posted
19-Nov-2008 11:14 GMT
Toolset
ARM
New! RE: PLL Configuration

we are working with the ULINK 2 debugger
when we force the value of the PLOCK to 1(i.e we are forcing to come out of the PLL lock sequence)
the code is working fine

But we dont know why the PLLC and PLOCK bit of PLL status register is not set.

Read-Only
Author
Per Westermark
Posted
19-Nov-2008 11:40 GMT
Toolset
ARM
New! RE: PLL Configuration

OK. So you are using live hardware, and not the simulator.

Are you using the Configuration Wizard to set up these parameters?

Have you remembered to set a clock divider of 5? (280/5 = 56MHz)

Have you double-checked that you have selected the internal oscillator, so there really is a 4MHz signal for the PLL to use?

Read-Only
Author
Hi Harish G
Posted
20-Nov-2008 05:59 GMT
Toolset
ARM
New! RE: PLL Configuration

Hi
We have verified the clock configuration value it is set to 5.
Here are our observation on doing some experiments

Observation 1:
When we force the value of PLOCK(force R3 to 0x04000022 at line ANDS R3, R3, #PLLSTAT_PLOCK) so that it comes out of loop and the code is working fine.

Observation 2:
we created a small project with the above settings for the PLL and only a while loop within the main function
The Execution will not struk up it will come to main on entering to the debug mode.

Could you please guide us what may the problem.

Read-Only
Author
Per Westermark
Posted
20-Nov-2008 09:16 GMT
Toolset
ARM
New! RE: PLL Configuration

Have you seen this thread, which is also about your problem:
http://www.keil.com/forum/docs/thread13625.asp

Next Thread | Thread List | Previous Thread Start a Thread | Settings