Main Clock max frequency

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Main Clock max frequency

2,132 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rcazalis on Wed Jul 14 13:13:15 MST 2010
Hi,

on LPC1114, the PLL is said to output frequencies from 156 to 320MHz. If the post divider P is set to 1 then the main clock can be from 78 to 160MHz.
Is this correct? Will it work OK?

At first I thought the max frequency would be 50MHz but I can't find any spec in the datasheet.
I also noticed it does work... I'm currently with a main clock at 132MHz and CPU at 44MHz.

Thanks in advance.

Romain
0 Kudos
Reply
10 Replies

2,110 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rcazalis on Thu Jul 15 12:51:02 MST 2010
Thanks Zero,

Yes, I've checked with scope on Clkout and SPI.
I could try to push clkout but at the moment I have another chip driven by this clock and the limit is 27MHz. I don't think it would damage but I'd prefer not try now...

I haven't measured any current because the application is running off mains so no real issue.
0 Kudos
Reply

2,110 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Jul 15 10:55:23 MST 2010
1. Your settings are correct (little typo: MSEL=10, M=11, PSEL =0, P=1 :))
2. I think You checked your counter i or SPI clock to control main clock?

While waiting for NXP, could you scope 132MHz main clock at clockout with

LPC_SYSCON->CLKOUTCLKSEL = 0x03; // set CLKOUT to main clock
LPC_SYSCON->CLKOUTUEN = 0x00;
LPC_SYSCON->CLKOUTUEN = 0x01;
LPC_SYSCON->CLKOUTDIV = 0x01; //want to see full speed!


or is CLKOUT limited (Hello NXP :D) ?

And did You recognize an increasing current draw while increasing main clock?
0 Kudos
Reply

2,110 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rcazalis on Thu Jul 15 08:38:30 MST 2010
OK, here are the first lines of my main(). That's running on a genuine LPCXpresso 1114 board so crystal is 12MHz.

    LPC_SYSCON->SYSPLLCLKSEL = 0x01;            // select clock source of PLL to be system oscillator (xtal)
    LPC_SYSCON->SYSPLLCLKUEN = 0x00;
    LPC_SYSCON->SYSPLLCLKUEN = 0x01;
    LPC_SYSCON->SYSPLLCTRL = 0x0A;              // set PLL to x11 (M=10 and P=1)
    i = 500;                                    // 50 should be enough but lets leave a x10 margin
    while (i && (LPC_SYSCON->SYSPLLSTAT == 0))  // wait with timeout for PLL to lock
        i--;

    if (i)                                      // if PLL locked then select main clock to be PLL output
    {
        LPC_SYSCON->SYSAHBCLKDIV = 0x03;
        LPC_SYSCON->MAINCLKSEL = 0x03;
    }
    else                                        // otherwise, main clock is system oscillator (xtal)
        LPC_SYSCON->MAINCLKSEL = 0x01;
    LPC_SYSCON->MAINCLKUEN = 0x00;
    LPC_SYSCON->MAINCLKUEN = 0x01;

    LPC_SYSCON->CLKOUTCLKSEL = 0x01;            // set CLKOUT to be from system oscillator (xtal)
    LPC_SYSCON->CLKOUTUEN = 0x00;
    LPC_SYSCON->CLKOUTUEN = 0x01;
    LPC_SYSCON->CLKOUTDIV = 0x05;               // set CLKOUT to be be divided by 5

    LPC_IOCON->PIO0_1 = 0x01;                   // set PIO_0.1 to be CLKOUT

    // ***** Init of SPI0 *****
    LPC_SYSCON->PRESETCTRL |= 0x1;              // enable SPI0
    LPC_SYSCON->SYSAHBCLKCTRL |= (1<<11);       // enable SPI0's clock
    LPC_SYSCON->SSP0CLKDIV = 0x19;              // set SSP0 PCLK to be be divided by 25

In this case main_clock will be 132MHz because 11 times xtal. CPU is at 44MHz (main_clock/3) and SPI's PCLK is around 5.3MHz (main_clock/25).
I know this runs fine but I just wanted an NXP tech guy to confirm I can release this on the market...

Thanks.
0 Kudos
Reply

2,110 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by IGW on Thu Jul 15 06:18:38 MST 2010
The issue rcazalis is asking about seems clear enough to me. Look at fig 3 (page 11) and fig 4 (page 38) of user manual (REV00.14 - 22 June 2010).

PLL runs at 156MHz to 320 MHz (data sheet).

Minimum output divide ratio (from PLL to sys_pllclkout) is 2 (the P divider).

So sys_pllclkout, and thus MAIN CLOCK, can run at 78 to 160 MHz - if P=2.

Legal or illegal?

If illegal where in spec does it say so?

If illegal - why offer divide by 2 for the P divider?

All peripherals and cpu can have lower (< 50 MHz) clocks since they all have dividers on the inputs.

There seems to be some detail missing or not very clear from this area of the data sheet. There does not seem to be a specified limit for max freq for MAIN_CLOCK.
0 Kudos
Reply

2,110 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Jul 15 05:24:28 MST 2010
Hi again,
I think we are mixing different things, to avoid further confusion please post your clock setup.
0 Kudos
Reply

2,110 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Jul 15 01:55:02 MST 2010
Yes, why not :confused:? If you select SEL= 0b11 in MAINCLKSEL your main clock is switched to 'System PLL clock out' with 156 to 320 MHz range (Sorry to say that again).
[FONT=Arial][SIZE=1]
[/SIZE][/FONT]
0 Kudos
Reply

2,110 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rcazalis on Thu Jul 15 00:25:10 MST 2010
Hi all,

please note that main clock is the clock that is getting out of the MAINCLKSEL, it does not feed directly the CPU or the peripherals. There are dividers.
In my current setup I have the main clock running at 132MHz but I divide by 3 for CPU so system clock is 44MHz (within spec) and SPI clock is divided by 25 (so roughly SPI PCLK is 5.3MHz).
All my periph clock are lower then 50MHz so within spec.

I'm asking if the main clock (see p11 of manual) can be up to 160MHz.

If this is not the case then  P in SYSPLLCTRL can never be 1... which would be surprising.

Thanks again.
0 Kudos
Reply

2,110 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cfb on Wed Jul 14 17:24:42 MST 2010

Quote: rcazalis
Can someone confirm that the main clock can run up to 160MHz?


Why do you ask? Note that flash memory access is only guaranteed up to 50Mhz. (see FLASHTIM)
0 Kudos
Reply

2,110 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rcazalis on Wed Jul 14 15:17:46 MST 2010
Thanks Zero but I already know that as it is mentioned in my post... does it answer my question?

Can someone confirm that the main clock can run up to 160MHz?
0 Kudos
Reply

2,110 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed Jul 14 14:15:45 MST 2010
[LEFT][B][FONT=Arial][COLOR=#005042][FONT=Arial][COLOR=#005042][FONT=Arial][COLOR=#005042][B][FONT=Arial][COLOR=#005042][FONT=Arial][COLOR=#005042][FONT=Arial][SIZE=5][COLOR=#005042]UM10398[/COLOR][/SIZE][/FONT][/COLOR][/FONT][/COLOR][/FONT][/B][/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][/B][/LEFT]
[SIZE=4][FONT=Arial][COLOR=#005042][SIZE=4][FONT=Arial][COLOR=#005042][SIZE=4][FONT=Arial][COLOR=#005042][B][B][FONT=Arial][SIZE=4][COLOR=#005042][FONT=Arial][SIZE=4][COLOR=#005042][FONT=Arial][SIZE=4][COLOR=#005042]LPC111x/LPC11C1x User manual[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/B][/B]
[/COLOR][/FONT][/SIZE][/COLOR][/FONT][/SIZE][/COLOR][/FONT][/SIZE]

[SIZE=4][FONT=Arial][COLOR=#005042][SIZE=4][FONT=Arial][COLOR=#005042][SIZE=4][FONT=Arial][COLOR=#005042][B]Chapter 1: LPC111x/LPC11C1x Introductory information[/B][/COLOR][/FONT][/SIZE]

[SIZE=4][FONT=Arial][COLOR=#005042][B][B][FONT=Arial][SIZE=4][COLOR=#005042][FONT=Arial][SIZE=4][COLOR=#005042][FONT=Arial][SIZE=4][COLOR=#005042]1.1 Introduction[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/B][/B]

[SIZE=4][FONT=Arial][COLOR=#005042][B][SIZE=4][FONT=Arial][COLOR=#005042][B][SIZE=4][FONT=Arial][COLOR=#005042]....[/COLOR][/FONT][/SIZE][/B][/COLOR][/FONT][/SIZE][/B]

[SIZE=4][FONT=Arial][COLOR=#005042][B][B][SIZE=4][FONT=Arial][COLOR=#005042][FONT=Arial][SIZE=2][FONT=Arial][SIZE=2]The LPC111x/LPC11C1x operate at CPU frequencies of up to 50 MHz.[/SIZE][/FONT][/SIZE][/FONT][/COLOR][/FONT][/SIZE][/B][/B]

[SIZE=4][FONT=Arial][SIZE=4][FONT=Arial][SIZE=4][FONT=Arial][COLOR=#005042][FONT=Arial][SIZE=4][COLOR=#005042][FONT=Arial][SIZE=4][COLOR=#005042][FONT=Arial][SIZE=4][COLOR=#005042][B]3.10 System PLL functional description[/B][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/FONT][/SIZE]

[SIZE=4][FONT=Arial][COLOR=#005042][SIZE=4][FONT=Arial][COLOR=#005042][SIZE=4][FONT=Arial][COLOR=#005042][SIZE=4][FONT=Arial][COLOR=#005042][B]...[/B][/COLOR][/FONT][/SIZE][/COLOR][/FONT][/SIZE]

[LEFT][SIZE=4][FONT=Arial][COLOR=#005042][SIZE=4][FONT=Arial][COLOR=#005042][FONT=Arial][SIZE=2][FONT=Arial][SIZE=2][B]The CCO frequency range is 156 MHz to 320 MHz.[/B][/SIZE][/FONT][/SIZE][/FONT][/COLOR][/FONT][/SIZE][/COLOR][/FONT][/SIZE][/LEFT]


[SIZE=4][FONT=Arial][COLOR=#005042][SIZE=4][FONT=Arial][SIZE=3]Bonsoir Paris, chaque année je veut revenir et travailler à Paris comme il y a très longtemps :).[/SIZE][/FONT][/SIZE][/COLOR][/FONT][/SIZE][/COLOR][/FONT][/SIZE][/COLOR][/FONT][/SIZE][/FONT][/SIZE][/FONT][/SIZE][/COLOR][/FONT][/SIZE][/COLOR][/FONT][/SIZE][/COLOR][/FONT][/SIZE][/COLOR][/FONT][/SIZE][/COLOR][/FONT][/SIZE]
0 Kudos
Reply