Sonsivri

Electronics => Projects => Topic started by: khan_yousaf on October 02, 2009, 08:37:11 08:37



Title: How to set the clock frequency?
Post by: khan_yousaf on October 02, 2009, 08:37:11 08:37
I am using ICCV7ARM for programming of LPC2138. But there is no option in the compiler to set the clock frequency of the processor....How will that be handled? Do i need to edit the Makefile?


Title: Re: How to set the clock frequency?
Post by: jestanoff on October 02, 2009, 10:54:11 10:54
LPC2138 has Phase-Locked Loop for set the clock frequency, so refer the data sheet how to set PLL.


Title: Re: How to set the clock frequency?
Post by: khan_yousaf on October 03, 2009, 06:35:51 06:35
Probably this is the way to it....
To change the PLL multiplier value on the LPC2138, you must perform a few extra steps after writing the new multiplier and control values to the PLLCFG and PLLCON registers. These steps entail writing 0xAA and then 0x55 to the PLL feed register (PLLFEED). This action loads the PLL control and configuration information from the PLLCON and PLLCFG registers into the shadow registers that actually affect PLL operation. It’s basically a good way to prevent accidental changing of the PLL value.