Default Debug mode SystemCoreClock frequency

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

Default Debug mode SystemCoreClock frequency

1,800件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bhallett on Tue Mar 16 10:24:14 MST 2010
Hello all,

Does anyone know how to change the assumed 72Mhz SystemCoreClock frequency that is used when running LPCXpresso in debug mode ? I want to change this to 12Mhz.

Regards

Barry
0 件の賞賛
返信
5 返答(返信)

1,763件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by brucesegal on Wed Mar 17 08:41:55 MST 2010
Sorry about that I misunderstood the question.
0 件の賞賛
返信

1,763件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Mar 17 02:52:57 MST 2010
Barry,

The link from brucesegal is a red herring. As per the post from kendwyer, the clock speed that the MCU runs your code at is set by the initialisation code contained within the CMSISv1p30_LPC13xx library project (assuming of course that you are linking with CMSIS).

Thus if you want to change from the default setting of 72MHz, you need to look at the #define's and the SystemInit() code in system_LPC13xx.c together with the LPC13 user manual, and modfiy as appropriate.

You should note that changing the code within the CMSIS library project will cause all projects in that workspace to use the modified code. If this is problem for you, then you may want to create a copy of the CMSIS project and modify the copy [making sure you update the links from your application project], or to copy the CMSIS files into the application project you want to use the modified clock speed in.

Regards,

CodeRedSupport
0 件の賞賛
返信

1,763件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bhallett on Wed Mar 17 01:46:57 MST 2010
The "target extended-remote" line is currently set as:

target extended-remote | ${gdb.stub} -g -mi -${debug.level:2} ${-c+speed:$null} ${-p+package:$null} ${-e+emulator:$null} ${vector.catch?-vc:}


I have tried to put "-c12000" on the end but there is no change when I read the "SystemCoreClock" setting during a debug session.

I have even changed ${-c+speed:$null} to ${-c+speed:12000} and there does not seem to be any change.

Regards

Barry
0 件の賞賛
返信

1,763件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kendwyer on Tue Mar 16 19:34:36 MST 2010
You could just let the chip run off the IRC (12MHz), to do this you'll have to make changes to the system_LPC11xx.c file in the CMSIS library code that comes with the examples.
0 件の賞賛
返信

1,763件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by brucesegal on Tue Mar 16 13:30:17 MST 2010
From the Code Red site (and I haven't tried this)
http://support.code-red-tech.com/CodeRedWiki/SettingCrystal

[B]Setting Crystal and PLL value for a target board[/B]
You can tell the debug chain the crystal frequency of a target board, although there isn't a convenient UI for doing this (it will be fixed in a future update).
To set the crystal frequency, please do the following:
Run->Open Debug Dialog
Select the debug configuration you wish to change
Switch to the Debugger tab
Press the Edit Scripts... button
edit the line beginning with "target extended-remote" and at the end of the line, add -c(your crystal value in kHz)
Press the OK button
Press Apply
The defintion of the -c options is:
-c  = Set crystal speed for chip (in kHz), and optionally PLL value
     (e.g. -c2000 or -c8000,50000).
0 件の賞賛
返信