LPC1114 with 50MHz using 12MHz IRC

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC1114 with 50MHz using 12MHz IRC

2,865件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by antodonne on Wed Feb 22 06:38:17 MST 2012
Hello,

I got an issue to reach this frequency using the PLL.
Someone got information or sample code to explain how I can do that?
Thank you and best regards.

Antoine
0 件の賞賛
返信
12 返答(返信)

2,743件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Feb 23 09:22:01 MST 2012

Quote: mawa
Because there are some settings in the debug configuration.
For example there is a input field to set XTAL frequency and PLL value.



There's no need to change settings from default (= no entry) :)
0 件の賞賛
返信

2,743件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wama on Thu Feb 23 06:29:08 MST 2012

Quote: Zero
No, why do you ask? LPC-Link is debugging your mcu, regardless of 24 or 48 MHz :)



Because there are some settings in the debug configuration.
For example there is a input field to set XTAL frequency and PLL value.
0 件の賞賛
返信

2,743件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Feb 23 05:45:17 MST 2012

Quote: mawa
Now the mcu is running at 24Mhz. Is there anything to do in debug mode?



No, why do you ask? LPC-Link is debugging your mcu, regardless of  24 or 48 MHz :)
0 件の賞賛
返信

2,743件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wama on Thu Feb 23 05:35:56 MST 2012
Ok, thank you.
I already found this defines in system_LPC11xx.h but forgot to set MAINCLK_SEL_Val :rolleyes:.

Now the mcu is running at 24Mhz. Is there anything to do in debug mode?
[SIZE=2][/SIZE]
0 件の賞賛
返信

2,743件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Feb 23 04:54:36 MST 2012
In system_LPC11xx.c of your CMSIS library you can find the main settings:

...
#define CLOCK_SETUP           1
#define SYSCLK_SETUP          1
#define SYSOSC_SETUP          1
#define SYSOSCCTRL_Val        0x00000000
#define WDTOSC_SETUP          0
#define WDTOSCCTRL_Val        0x000000A0
#define SYSPLLCLKSEL_Val      0x00000001
#define SYSPLL_SETUP          1
[B][COLOR=Red]#define SYSPLLCTRL_Val        0x00000023[/COLOR][/B]
#define MAINCLKSEL_Val        0x00000003
#define SYSAHBCLKDIV_Val      0x00000001
#define AHBCLKCTRL_Val        0x0001005F
#define SSP0CLKDIV_Val        0x00000001
#define UARTCLKDIV_Val        0x00000001
#define SSP1CLKDIV_Val        0x00000001
...
In UM10398 chapter 3.5.3 'System PLL control register' and chapter 3.11.4.1 'Normal mode' you can find some formulas and table 45, as mentioned in this post already
0 件の賞賛
返信

2,743件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wama on Thu Feb 23 04:38:27 MST 2012
Do I have to set this values in the function "SystemInit()"?

Which setting are necessary to debug with 24Mhz? I use LPC-Link for debugging.
0 件の賞賛
返信

2,743件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by serge on Thu Feb 23 00:27:02 MST 2012
Rosenmontag may be over for zero :D but in Belgium we have carnival till the end of march...:p
0 件の賞賛
返信

2,743件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vostro1000 on Wed Feb 22 15:07:13 MST 2012
Carnival is over :)
0 件の賞賛
返信

2,743件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed Feb 22 11:08:23 MST 2012

Quote: NXP_Europe

FCLKOUT = M * FCLKIN ... ([B][COLOR=Red]< 100 MHz[/COLOR][/B])



Really funny :) It's carnival time :rolleyes:
0 件の賞賛
返信

2,743件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Europe on Wed Feb 22 10:54:05 MST 2012
Hello antodonne,

When choosing a frequency, it should be times an integer value (M) of the basic clock-oscillator (e.g. 12 MHz IRC).

Like Zero and Arneb said, in Table 45. in UM10398, is shown which values are possible.

FCLKOUT = M * FCLKIN ... (< 100 MHz)
FCCO = FCLOUT / (2 * P) ... (> 156 MHz and < 320 MHz)

Example 1.: your choice would be M = 9, then FCLKOUT = 108 MHz, which is out of spec (< 100 MHz).

Example 2.: Suppose M=4 and P=1, FCLKOUT = M * FCLKIN = 4 * 12 MHz = 48 MHz
then FCCO = 2 * P * FCLKOUT = 2 * 1 * 48 = 96 MHz
Not possible ... because: 156 MHz < FCCO < 320 MHz

In Fig 5. a figure is shown how the total fitts together.
0 件の賞賛
返信

2,743件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ArneB on Wed Feb 22 08:42:16 MST 2012
...but you are able to achieve 48MHz with P=2 (PSEL=1) and M=4 (MSEL=3), see table 45, page 45 of the user manual.
0 件の賞賛
返信

2,743件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed Feb 22 07:13:46 MST 2012
You're kidding?

As described in User manual UM10398, Chapter 3.11.4.1:


Quote:

2. Calculate M to obtain the desired output frequency FCLKOUT with
M = FCLKOUT / FCLKIN.

So that's not possible with 12MHz :(
0 件の賞賛
返信