SystemCoreClock

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

SystemCoreClock

2,475 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jdurand on Thu Sep 06 16:04:56 MST 2012
I see in CMSISv2p00_LPC12xx that the SystemCoreClock is set to 24MHz (I do wish that was more clear instead of having to calculate it). From the application note I found, it sounds like it's not recommended to change that after the fact, but instead make a private copy of CMSIS (hopefully renaming it since it's been changed) and change the defines in that.  Is that correct?

Also, is it known why 24MHz was chosen as the standard clock for this part?  I know going over 30MHz requires wait states in the Flash controller, but since it's advertised as a 45MHz part it just seems that 24 is a bit of a letdown.  :)
Labels (1)
0 Kudos
Reply
5 Replies

2,019 Views
athmesh_n
Contributor IV

Is there anyway SystemCoreClock automatically changeits value to 0 from 72000000? if so, what can be the reason?

0 Kudos
Reply

2,019 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fjrg76 on Thu Jul 18 19:08:57 MST 2013
You might want to check out this tutorial

http://fjrg76.wordpress.com/2012/11/02/configuring-the-clock-options-for-the-lpc1227/
0 Kudos
Reply

2,019 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by DiligentMinds.com on Thu Sep 20 11:40:19 MST 2012
I'm pretty sure ARM supplies the CMSIS file for the core, and the device manufacturer supplies the CMSIS file for the peripherals.  This is because each manufacturer has a different set of peripherals and they usually work differently.  ARM has some peripheral IP that can be used, and if you build a part with their peripherals, then you can use the CMSIS files from ARM for those.

What really kills me is that some of the manufacturers did not wisely choose a naming convention for peripheral register and/or bit names-- and so (sometimes) the register and/or bit names in the CMSIS file will be at variance with the programmer's reference manual for the part (which makes it hard to search for help, or to search the code if starting with the manual)-- and even worse, the register and/or bit names in the CMSIS file can vary from part to part, even though they have the exact same function.  It can be a bit confusing at times, especially if you are new to the part.  It's just something we have to live with-- once you create the CMSIS file for the part, it's really hard to change things because you can end up breaking end-user's already working code.  This problem is contrary to the whole idea of CMSIS-- which was to be able to change from one manufacturer to another (for the core functions)-- and not have to change your source (and this part of CMSIS is working)-- but also, when changing from part to part from one manufacturer, we should not have to change our source (and that part is not working as well as it could).  I "get it" though-- sometimes a manufacturer wants to upgrade a peripheral on a new part, and so the CMSIS file *can* have changes that are impossible to reconcile without end-user code changes.

Just one of life's little problems that we have to deal with...  Oh well...
0 Kudos
Reply

2,019 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jdurand on Thu Sep 20 10:31:32 MST 2012
I thought CMSIS came from ARM, not NXP.
0 Kudos
Reply

2,019 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by drs on Wed Sep 19 17:01:30 MST 2012
The SystemCoreClock is set to 24MHz because the development boards we write out example software for all have 12MHz crystals.

Your comments on the poor comments in the code and lack of clear explaination of how to setup the clock is certainly warranted here. We will work on this to make it easier for you to setup the clocks.

As always we appreciate this sort of feedback. Keep it coming!
0 Kudos
Reply