Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2000] Re: Activating Boot Loader for LPC2000 Flash Untility

2004-07-08 by Robert Adsett

At 06:20 PM 7/8/04 +0000, you wrote:
>Here's a thought, how about reading sector zero into RAM and erasing
>the location corresponding to location 0x14 in flash (valid code
>ID).  Then erase sector zero and write back the modified version from
>RAM.  That way you have cleared the valid code ID and the next reset
>will result in entry into ISP mode.

I don't think that's any more effective than simply erasing the first 
sector, although it does give it a longer period to run between being made 
invalid and actually requiring a reload.  It doesn't get rid of the basic 
vulnerability of trying to set up ISP w/o access to P0.14 though.  If you 
only get partway through reloading the flash (say you erase the device and 
program the first two sectors) you end up with a device with an invalid 
program that 'thinks' it has a valid program.  You can't force it into ISP 
mode in hardware and there isn't enough program left to shift it into ISP 
mode  in software.

Just to contribute my own angst to the subject.  If you really are in a 
situation where you can't afford the extra pin then something like the 
following might work.

Add a small cheap micro to snoop on the incoming (RxD) serial line of the 
LPC.  When it detects some unique sequence that is not valid for the 
program in the LPC it asserts the reset line and pulls P0.14 low.  It can 
then deassert the reset line and voila you are in ISP mode.  On reset (or 
another unique sequence) it simply lets the reset and P0.14 lines float 
free again.

That doesn't require any more care on P0.14 than it already requires and 
the micro needed should be relatively inexpensive.  Still seems like a lot 
of work to avoid a pin though.

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,
be they legal, genetic, or physical.  If you don't believe me, try to
chew a radio signal. "

                         Kelvin Throop, III

Attachments

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.