NXP LPC2888 USB flash programming hack

We have an NXP LPC2888 prototype board which, due to a design oversight, has the USB flash programming mode pins (mode1/P2[2] and mode2/p2[3]) unconnected and unreachable under the BGA package. The LPC2888 is therefore always in the "Execute user program from internal flash memory" mode unless the "valid program" marker flag at 0x104F_F800 is not set as 0xAA55_AA55. Therefore it seems that once we program the chip for the first time, it will be bricked forever.

Obviously a board re-spin is in order but as a temporary hack to allow some work to be done in the mean time the question is:

Can we prevent the magic cookie vale of 0xAA55_AA55 from being written during USB flash programming?

If so, would the chip begin executing the new user code from flash memory after the flash programming? Would the next power up then have the chip's boot ROM again enter the "Download program from USB port to memory" mode having not seen the valid magic cookie value?

Please forgive our ignorance as we have never done any design with ARM based microcontrollers before and the LPC2888 user manual does not seem to explicitly indicate this. Experimentation would probably reveal the actual behaviour but we don't want to risk bricking the only board we have.

Reply to
info
Loading thread data ...

You might check with the LPC2000 Yahoo group for someone with experience. The way the LPC2000s work is the checksum is calculated and written by the programming program (so to speak) not the chip so you should be able to write or modify a program to leave out the check word.

However, if you do so it's not going to run unless you give it some sort of explicit start command,

Do you have JTAG wired up? That may give you another way in.

Robert

--
Posted via a free Usenet account from http://www.teranews.com
Reply to
Robert Adsett

Hi,

don't know your answer but probably a better place to ask. Have a look at the Yahoo LPC2000 forum, just use LPC2000 for search in Google and it will come up on the first page. LPC2888 did not make it into the most popular ones there but nevertheless, there are approx. 5k subscribers to that Yahoo forum, so there is a reasonable chance to find somebody with the answer.

Robert

Reply to
Robertus

the

after

5,000 subscribers, and about two dozen who actually have a clue...

--Gene

Reply to
Gene S. Berkowitz

Thanks for the helpful responses. Unfortunately the JTAG pins are not routed out from under the BGA either. Looks like best plan is to just wait for a board respin and concentrate on other parts of the project in the mean time.

Reply to
info

has

unconnected

the

during

after

ROM

based

Well Gene, I don't remember your name in the list of contributors but most definitely more LPC2000 users than in this group. Many questions get an answer within the hour, some do not. As I said, the LPC2888 is not the most popular device there. If you have some advise, feel free to post it, if not, don't waste your and our time Robert

Reply to
Robertus

,

has

unconnected

in the

some

during

memory after

boot ROM

not

based

actual

I'm in there, and I read the digests daily. It gets pretty tiring when I encounter the same types of "I have been given a project to (insert major product development task here) for which I have no training or adequate skill set, please tell me what to do" requests OVER and OVER (I am NOT referring to the original poster, who went to the trouble of accurately diagnosing his problem before asking for help with the solution).

The answers (to the REAL questions) tends to come from the same small core group of persons who have spent most of their lives in the embedded field, and have learned how to learn.

I stand by my statement that the vast majority of those 5K subscribers came there looking for help with their homework, or help with a job they are completely unqualified for.

And the answer to the original poster is "write some assembly code to wipe the magic cookie address, and load THAT to internal flash." Every time the board powers up, it will blow away the cookie, allowing the ROM boot loader to run again.

Yahoo Groups (along with Google) share some of the responsibility for the decay of Usenet, and I don't think they are offering a much better alternative.

--Gene

Reply to
Gene S. Berkowitz

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.