Selecting Internal Oscillator

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

Selecting Internal Oscillator

1,180 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ajg112 on Mon Jan 14 13:13:12 MST 2013
Hi All,

I'm wondering if there is a 'proper' way of selecting the internal oscillator, or more accurately not switching to the external crystal. I'm using LPC1313.

The default in the system_LPC13xx.c is switch over to using the external crystal, which is assumed to be 12MHz, at system startup.

If I edit this file, this will affect other projects. Is there some way of selecting to use the internal oscillator in a 'per-project' basis?

Apologies if I've missed some documentation, but I just can't find it.

Many thanks
Andy
0 Kudos
Reply
4 Replies

1,163 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ajg112 on Tue Jan 15 05:10:16 MST 2013
That works too. Many thanks
Andy
0 Kudos
Reply

1,163 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Jan 15 01:34:15 MST 2013
The simplest way  to do this is to take a copy of the system_LPC13xx.c file from the CMSIS library project and place it into your main application project.

The version of system_LPC13xx.c from the main application project will then get directly linked into your application, rather than a search being made by the linker and the version from the library project being found.

Thus you can modify the version in your main application project without fear of the changes being picked up by any of your other projects.

Regards,
CodeRedSupport
0 Kudos
Reply

1,163 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ajg112 on Mon Jan 14 14:47:36 MST 2013
Many thanks Zero,
Seems like a good solution.
Andy
0 Kudos
Reply

1,163 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon Jan 14 13:57:34 MST 2013
I prefer to change my cr_startup_lpcXX.c file (in src). There you can find the SystemInit() function call ;)

For project specific settings I comment out this call and just add whatever I need from original SystemInit() :)
0 Kudos
Reply