Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 9 months ago.
MBED LPC824 change cpu clock
I think MBED sets maximum cpu clock by default. Can I change this ? I'd like low power but not using sleep or power down. Datasheet shows supply current 1.04 mA when 12 MHz and low current mode. Other way would be power profiles use (What supply currente ?). Some example code please.
2 Answers
8 years, 8 months ago.
Erik I changed the following line for lpc824 to half the speed. However my uarts are throwing garbage?
<code>
- define IRC_OSC_CLK (12000000UL)
</code>
<code>
- define IRC_OSC_CLK (06000000UL)
</code>
Can you point out what i am doing wrong?
You cannot change the clock frequency like that. The IRC_OSC has a fixed frequency of 12MHz, if you want to reduce the speed you need to change the PLL ratio (I assume you are using the PLL).
posted by 15 Apr 20168 years, 9 months ago.
You can delete your mbed lib, import mbed-dev. Go to /targets/cmsis/nxp/lpc82x/system.c (or something close to that), where the clock setups are defined. If you do it like this things like wait statements should still work correctly.
Search clock setup of LPCXpresso Board LPC824 may be at 10 MHz. My question: May I change this clock value without block board ?
posted by Renato Ferreira 07 Mar 2016