Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

LPC2129 IAP problem solved, sorta.

LPC2129 IAP problem solved, sorta.

2005-03-18 by yamppman

After about a year on Prozac and Valium since my last encounter with 
the Philips LPC series, I'm on it again, using it in a new project.
And I need to use the IAP functionality ofcourse.

And after spending several hours trying all kinds of variants on the 
apparently non-working IAP sample code from Keil and ripping out 
most of my remaing hair, I thought I'd share some info.

According to the user manual, and the Keil example, the erase and 
write calls require the processor clock frequency in a parameter, 
presumably to time the flash functions.

What's NOT mentioned is that it does not work if you're running the 
CPU at "normal" speed, 60 MHz.

The code would end up all over the place - in the Abort or Undef 
handler or way off at memory position 0x800xxxx.
Also, the Setup for Erase/Write calls would take 50-100 mS to 
complete.

As soon as I dropped the cclk to 12 MHz by disabling the PLL, 
everything worked immediately. And the calls returned much faster.


So, it just proof the old classic, never trust a Philips Datasheet !

/Jesper

Re: [lpc2000] LPC2129 IAP problem solved, sorta.

2005-03-18 by Bill Knight

On Fri, 18 Mar 2005 18:47:13 -0000, yamppman wrote:



After about a year on Prozac and Valium since my last encounter with 
the Philips LPC series, I'm on it again, using it in a new project.
And I need to use the IAP functionality ofcourse.

And after spending several hours trying all kinds of variants on the 
apparently non-working IAP sample code from Keil and ripping out 
most of my remaing hair, I thought I'd share some info.

According to the user manual, and the Keil example, the erase and 
write calls require the processor clock frequency in a parameter, 
presumably to time the flash functions.

What's NOT mentioned is that it does not work if you're running the 
CPU at "normal" speed, 60 MHz.

The code would end up all over the place - in the Abort or Undef 
handler or way off at memory position 0x800xxxx.
Also, the Setup for Erase/Write calls would take 50-100 mS to 
complete.

As soon as I dropped the cclk to 12 MHz by disabling the PLL, 
everything worked immediately. And the calls returned much faster.


So, it just proof the old classic, never trust a Philips Datasheet !

/Jesper
------------------------------------------------------------------

I have IAP programming running on an LPC2114 at 60MHz.  See
LPC-FlashRoutines-18Feb05.zip in the files section on yahoo.
Note the clock frequency parameter is in KHz (60,000,000 / 1000)

Regards
-Bill Knight
R O SoftWare &
http://www.theARMPatch.com









Yahoo! Groups Links

Re: LPC2129 IAP problem solved, sorta.

2005-03-19 by Mark Butcher

Hi

Programming the LPC210x at 60MHz didn't cause a problem - it seems 
to work fine.

We did make a mistake in passing the PCLK (1/4 in this case) instead 
of the CLOCK as parameter (in kHz). The effect was that the FLASH 
was not programmed long enough and so the data was not reliable. 
Typically the board would work fine after power up but after a reset 
it wouldn't start because a check sum run across the program code 
would signal an error.

After this silly mistake all has been stable.

Regards

Mark Butcher

www.mjbc.ch

> So, it just proof the old classic, never trust a Philips 
Datasheet !
> 
> /Jesper

LPC2129 IAP problem solved, sorta.

2005-03-19 by Stephen Pelc

> What's NOT mentioned is that it does not work if you're running
> the CPU at "normal" speed, 60 MHz.
> 
> The code would end up all over the place - in the Abort or Undef
> handler or way off at memory position 0x800xxxx. Also, the Setup
> for Erase/Write calls would take 50-100 mS to complete.

Are you using the latest boot loader software? If it is before 
v1.6x (AFAIR), you will have these problems. I can't speak for 
the 2129, but we had identical issues with the 2106 eighteen 
months ago. With the current bootloader you just have to disable 
interrupts around the call.

Stephen

--
Stephen Pelc, stephen@...
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 23 80 631441, fax: +44 23 80 339691
web: http://www.mpeltd.demon.co.uk - free VFX Forth downloads

Re: LPC2129 IAP problem solved, sorta.

2005-03-21 by yamppman

--- In lpc2000@yahoogroups.com, "Stephen Pelc" <stephen@m...> wrote:
> > What's NOT mentioned is that it does not work if you're running
> > the CPU at "normal" speed, 60 MHz.
> > 
> > The code would end up all over the place - in the Abort or Undef
> > handler or way off at memory position 0x800xxxx. Also, the Setup
> > for Erase/Write calls would take 50-100 mS to complete.
> 
> Are you using the latest boot loader software? If it is before 
> v1.6x (AFAIR), you will have these problems. I can't speak for 
> the 2129, but we had identical issues with the 2106 eighteen 
> months ago. With the current bootloader you just have to disable 
> interrupts around the call.
> 
No, I have the latest 1.6, and I did not have any interrups enabled, 
it was run directly at powerup.
Seems to work fine at 12 MHz, so I just disable the PLL while 
programming.

/Jesper

Re: LPC2129 IAP problem solved, sorta.

2005-03-21 by yamppman

> 
> I have IAP programming running on an LPC2114 at 60MHz.  See
> LPC-FlashRoutines-18Feb05.zip in the files section on yahoo.
> Note the clock frequency parameter is in KHz (60,000,000 / 1000)
> 
> Regards
> -Bill Knight
> R O SoftWare &
> http://www.theARMPatch.com

Excellent and useful bunch of code, but it has the same problem. It 
works when I disable the PLL and run at 12MHz, but it will not work 
at 60 MHz.

There seem to be a problem on the 2129 with this.

/Jesper

Re: LPC2129 IAP problem solved, sorta.

2005-03-21 by jim_e_dallas

--- In lpc2000@yahoogroups.com, "yamppman" <jesperh@t...> wrote:
> 
> > 
> > I have IAP programming running on an LPC2114 at 60MHz.  See
> > LPC-FlashRoutines-18Feb05.zip in the files section on yahoo.
> > Note the clock frequency parameter is in KHz (60,000,000 / 1000)
> > 
> > Regards
> > -Bill Knight
> > R O SoftWare &
> > http://www.theARMPatch.com
> 
> Excellent and useful bunch of code, but it has the same problem. It 
> works when I disable the PLL and run at 12MHz, but it will not work 
> at 60 MHz.
> 
> There seem to be a problem on the 2129 with this.
> 
> /Jesper

If your device is an older device, have you upgraded the bootloader? 
This sounds like the same problem that happened with the original 
boot loader on this device.

Jim

Re: [lpc2000] Re: LPC2129 IAP problem solved, sorta.

2005-03-21 by Bill Knight

On Mon, 21 Mar 2005 14:46:24 -0000, jim_e_dallas wrote:

--- In lpc2000@yahoogroups.com, "yamppman" <jesperh@t...> wrote:
> 
> > 
> > I have IAP programming running on an LPC2114 at 60MHz.  See
> > LPC-FlashRoutines-18Feb05.zip in the files section on yahoo.
> > Note the clock frequency parameter is in KHz (60,000,000 / 1000)
> > 
> > Regards
> > -Bill Knight
> > R O SoftWare &
> > http://www.theARMPatch.com
> 
> Excellent and useful bunch of code, but it has the same problem. It 
> works when I disable the PLL and run at 12MHz, but it will not work 
> at 60 MHz.
> 
> There seem to be a problem on the 2129 with this.
> 
> /Jesper

If your device is an older device, have you upgraded the bootloader? 
This sounds like the same problem that happened with the original 
boot loader on this device.

---
Good idea!  The code in the ZIP file has run for me without problems
for some time now.  And the LPC I'm using has the upgraded bootloader.

Regards
-Bill Knight
R O SOftWare &
http://www.theARMPatch.com

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.