Overclocking LPC213x.

Started by mark_dell555 October 31, 2005
Hi, I needed a bit more speed in my app, and I suppose i could of
tried to optimize it a bit, but I was feeling kinda lazy. So I
decided to overclock my lpc2134. I'm using a 14.745Mhz XTAL, normally
i was running at 59.0 Mhz with a flash access time of 51ns. First I
went to 73.7 Mhz (xtal*5) and 54ns flash access time. Everything
seemed stable and my app ran about 8.1% faster, my current draw went
to 65mA. Then I decided to up the flash access time (73.7 / 3 ~
24.5mhz) to 41ns. With this config my app ran 23% faster, and the
current draw rised to 67mA. The current draw at 59Mhz is 56.5mA.
I've summerized my results in the table below:

+--------+---------+--------------+--------------+---------+---------+
| PLL_M | MAM_T | SYSTEM CLOCK | FLASH ACCESS | CURRENT | SPEED |
+--------+---------+--------------+--------------+---------+---------+
| 4 | 3 | 59.0 Mhz | 51 ns | 56.5 mA | 100 % |
| 4 | 2 | 59.0 Mhz | 34 ns | 59.0 mA | 116 % |
| 5 | 4 | 73.7 Mhz | 54 ns | 65.0 mA | 108 % |
| 5 | 3 | 73.7 Mhz | 41 ns | 67.3 mA | 123 % |
+--------+---------+--------------+--------------+---------+---------+
Note: My application blinks an LED that draws about 3 mA.

Has anyone else experimented with overclocking the LPC21xx series?
Do you think overclocking this chip significantly reduces its lifetime?

Cheers,
Mark


An Engineer's Guide to the LPC2100 Series



> Has anyone else experimented with overclocking the LPC21xx series?
> Do you think overclocking this chip significantly reduces its lifetime?

Unless the part gets too hot, overclocking is unlikely to kill
it. You are more likely to start getting setup and hold times
between the core and Flash, and/or peripheral buses. However,
if you start to get close to 'the edge', what works on your
current hardware setup may not work on an identical board.

Code profiling and a little inline assembler might be a safer
bet :)

But, that's not to say you shouldn't try to break things and
come up with a few stats on the subject. Go for it!

Dave


Mark,

put your finger on top of the chip, as long as this does not feel
uncomfortably warm there should be no damage or shortened life cycle.
To have a lottle headromm, you want to overclock the CPU a lot more
than you did and try to find out when it fails. Then go backwards from
there.
Tests we did showed flakiness when MAMTIM was set to 3 and running the
core at approx. 100 MHz!
With MAMTIM set to 4 even 100 MHz at room temp seemed stable. Te
devices got warm but not hot. Keep in mind that external temps of 85C
could change the picture a little bit.
IMHO,
the LPC213x runs easily at 80 MHz with your calculated access time
between 35 and 40ns seems very save.

Bob

--- In lpc2000@lpc2..., "mark_dell555" <mark_dell555@y...> wrote:
>
> Hi, I needed a bit more speed in my app, and I suppose i could of
> tried to optimize it a bit, but I was feeling kinda lazy. So I
> decided to overclock my lpc2134. I'm using a 14.745Mhz XTAL, normally
> i was running at 59.0 Mhz with a flash access time of 51ns. First I
> went to 73.7 Mhz (xtal*5) and 54ns flash access time. Everything
> seemed stable and my app ran about 8.1% faster, my current draw went
> to 65mA. Then I decided to up the flash access time (73.7 / 3 ~
> 24.5mhz) to 41ns. With this config my app ran 23% faster, and the
> current draw rised to 67mA. The current draw at 59Mhz is 56.5mA.
> I've summerized my results in the table below:
>
> +--------+---------+--------------+--------------+---------+---------+
> | PLL_M | MAM_T | SYSTEM CLOCK | FLASH ACCESS | CURRENT | SPEED |
> +--------+---------+--------------+--------------+---------+---------+
> | 4 | 3 | 59.0 Mhz | 51 ns | 56.5 mA | 100 % |
> | 4 | 2 | 59.0 Mhz | 34 ns | 59.0 mA | 116 % |
> | 5 | 4 | 73.7 Mhz | 54 ns | 65.0 mA | 108 % |
> | 5 | 3 | 73.7 Mhz | 41 ns | 67.3 mA | 123 % |
> +--------+---------+--------------+--------------+---------+---------+
> Note: My application blinks an LED that draws about 3 mA.
>
> Has anyone else experimented with overclocking the LPC21xx series?
> Do you think overclocking this chip significantly reduces its lifetime?
>
> Cheers,
> Mark
>




I did a few more tests to see if I could get any more speed, but I
wasnt able. I wish the PLL had a few more steps, cause my only next
step is 88.6 Mhz, maybe I should of used a 10 Mhz xtal in the design.
Here is an updated table:

+---+---+----------+-------+---------+-------+
|PLL|MAM| SYS CLCK | FLASH | CURRENT | SPEED |
+---+---+----------+-------+---------+-------+
| 4 | 3 | 59.0 Mhz | 51 ns | 56.5 mA | 100 % |
| 4 | 2 | 59.0 Mhz | 34 ns | 59.0 mA | 116 % |
| 5 | 4 | 73.7 Mhz | 54 ns | 65.0 mA | 108 % |
| 5 | 3 | 73.7 Mhz | 41 ns | 67.3 mA | 123 % |
| 6 | 3 | 88.6 Mhz | 34 ns | 79.9 mA | 146 %*|
| 6 | 4 | 88.6 Mhz | 45 ns | 00.0 mA | 000 %&|
| 6 | 5 | 88.6 Mhz | 56 ns | 71.9 mA | 108 %@|
+---+---+----------+-------+---------+-------+

* Unstable - Freeze in under 60 seconds.
& Could not start up.
@ Other issue (BAD UART TX / duplicate characters) Anyways seems like 73.7 Mhz with 41ns access time is nice and stable.
Would be interesting to try 80.0 Mhz with 37.5ns access time. Maybe
tomorrow I'll swap out the xtal, and try it.

Cheers,
Mark
>
> Mark,
>
> put your finger on top of the chip, as long as this does not feel
> uncomfortably warm there should be no damage or shortened life cycle.
> To have a lottle headromm, you want to overclock the CPU a lot more
> than you did and try to find out when it fails. Then go backwards from
> there.
> Tests we did showed flakiness when MAMTIM was set to 3 and running the
> core at approx. 100 MHz!
> With MAMTIM set to 4 even 100 MHz at room temp seemed stable. Te
> devices got warm but not hot. Keep in mind that external temps of 85C
> could change the picture a little bit.
> IMHO,
> the LPC213x runs easily at 80 MHz with your calculated access time
> between 35 and 40ns seems very save.
>
> Bob
>


--- In lpc2000@lpc2..., "mark_dell555" <mark_dell555@y...>
wrote:
>
> +---+---+----------+-------+---------+-------+
> |PLL|MAM| SYS CLCK | FLASH | CURRENT | SPEED |
> +---+---+----------+-------+---------+-------+
> | 4 | 3 | 59.0 Mhz | 51 ns | 56.5 mA | 100 % |
> | 4 | 2 | 59.0 Mhz | 34 ns | 59.0 mA | 116 % |
> | 5 | 4 | 73.7 Mhz | 54 ns | 65.0 mA | 108 % |
> | 5 | 3 | 73.7 Mhz | 41 ns | 67.3 mA | 123 % |
> | 6 | 3 | 88.6 Mhz | 34 ns | 79.9 mA | 146 %*|
> | 6 | 4 | 88.6 Mhz | 45 ns | 00.0 mA | 000 %&|
> | 6 | 5 | 88.6 Mhz | 56 ns | 71.9 mA | 108 %@|
> +---+---+----------+-------+---------+-------+
>
> * Unstable - Freeze in under 60 seconds.
> & Could not start up.
> @ Other issue (BAD UART TX / duplicate characters)

Very interesting! It'll also be interesting if you can try that
10MHz PLC to see if you can get 80MHz. I wonder how much
variability there is between chips (i.e. it may work on your chip,
but what about others, and vice versa). I've been running into a
bit of speed issues that this would help to alleviate.

What code and what method are you using to do the benchmarks? I.e.
what is the speed actually measuring? You mentioned your LED flash
app. Are you just measuring how fast the LED flashes, or...?



> > * Unstable - Freeze in under 60 seconds.
> > &amp; Could not start up.
> > @ Other issue (BAD UART TX / duplicate characters)
>
> What code and what method are you using to do the benchmarks? I.e.
> what is the speed actually measuring? You mentioned your LED flash
> app. Are you just measuring how fast the LED flashes, or...?

and how do you guarantee that this really works for ALL devices. I would
not put an overclocked lpc21xx (or any other overclocked hardware) in a
commercial product. Small differences between chips may result in strange
errors that only appear in very specific situations.

But it's always nice to do some extreme testing. I've seen PCs cooled
using liquid Nitrogen - what would a 2106 do when cooled this way ;-)

Rob


> Very interesting! It'll also be interesting if you can try that
> 10MHz PLC to see if you can get 80MHz. I wonder how much
> variability there is between chips (i.e. it may work on your chip,
> but what about others, and vice versa). I've been running into a
> bit of speed issues that this would help to alleviate.
>
> What code and what method are you using to do the benchmarks? I.e.
> what is the speed actually measuring? You mentioned your LED flash
> app. Are you just measuring how fast the LED flashes, or...?
>

Yes, Basically I measure the how fast the LED flashes, however its not
in just a simple loop, and interrupts are enabled. But I did notice
that the speed increase during this loop is higher, then the speed
increase over a long period doing a more complex task. Ie, at 73.7Mhz
41ns the LED blinks 23% faster, however a more complex task (DES
encryption/decryption) has only spedup by 17%.


> and how do you guarantee that this really works for ALL devices. I
would
> not put an overclocked lpc21xx (or any other overclocked hardware) in a
> commercial product. Small differences between chips may result in
strange
> errors that only appear in very specific situations.
>
> But it's always nice to do some extreme testing. I've seen PCs cooled
> using liquid Nitrogen - what would a 2106 do when cooled this way ;-)
>
> Rob
>

I guess what we'd really need is to port prime95 to the lpc21xx :) I
lost the link, but I believe the new lpc2101..03 are rated at 70Mhz.
Perhaps that suggests that the process for making the chips has improved?

Mark



Hey, any more tests done on this?

I remember back in the early pentium days, getting a P133 and having
a very good probability of overclocking to 200MHz.

You could always do an overclock using the same method that is used
for SDRAM -- SPD eeprom I believe it is. Since the overclocking can
be done via software, set up a brute force test that runs on every
chip, and keep upping it until it becomes unstable :)

On that note, since there is an internal multiplier for the
frequency, is there any benefit to having a higher frequency
external oscillator? I.e. Is there any difference to performance if
I use an external 5MHz with 12x multiplier, or external 20MHz with
3x multiplier?

--- In lpc2000@lpc2..., "mark_dell555" <mark_dell555@y...>
wrote:
>
> > and how do you guarantee that this really works for ALL
devices. I
> would
> > not put an overclocked lpc21xx (or any other overclocked
hardware) in a
> > commercial product. Small differences between chips may result in
> strange
> > errors that only appear in very specific situations.
> >
> > But it's always nice to do some extreme testing. I've seen PCs
cooled
> > using liquid Nitrogen - what would a 2106 do when cooled this
way ;-)
> >
> > Rob
> >
>
> I guess what we'd really need is to port prime95 to the
lpc21xx :) I
> lost the link, but I believe the new lpc2101..03 are rated at
70Mhz.
> Perhaps that suggests that the process for making the chips has
improved?
>
> Mark
>




--- In lpc2000@lpc2..., "seangra" <sgraham@o...> wrote:
>
> Hey, any more tests done on this?
>
> I remember back in the early pentium days, getting a P133 and having
> a very good probability of overclocking to 200MHz.
>
> You could always do an overclock using the same method that is used
> for SDRAM -- SPD eeprom I believe it is. Since the overclocking can
> be done via software, set up a brute force test that runs on every
> chip, and keep upping it until it becomes unstable :)
>
> On that note, since there is an internal multiplier for the
> frequency, is there any benefit to having a higher frequency
> external oscillator? I.e. Is there any difference to performance if
> I use an external 5MHz with 12x multiplier, or external 20MHz with
> 3x multiplier?

I still have to do the 10Mhz test. As far as using 5Mhz external, you
have to remember that the PLL will only accept something in between 10
Mhz and 25 Mhz, not any lower. It would be interesting to test if the
PLL will run with external oscillator of less then 10Mhz. As far as
whether it makes any difference if you use a 10Mhz x6 or a 20Mhz x3,
I dont think it would. Another interesting test would be running at
3.5 or 3.6V and seeing if you can hit 100 Mhz stable, boosting voltage
always helps when overclocking.

Mark