89LPC922 reflash

Started by Larry Robertson, September 01, 2005, 05:05:16 PM

Previous topic - Next topic

Larry Robertson

I am trying to reflash an 89LPC922 using FlashMagic v2.37.   I used FlashMagic to flash the part the first time.

FlashMagic acts normally and goes through all the motions of reflashing the part but the code does not change.  I have confirmed the .HEX file contents have the new code changes.  I deleted the .HEX file and confirmed FlashMagic could not find it to make sure I was using the file I thought I was.  I don't see a way to look at the data buffer to be programmed via FlashMagic.

Is there any way FlashMagic can go through the motions and not actually change the flash?

Thanks in advance for any help.


Andy Ayre

Each time you click on start the hex file is reloaded. We did this to make it easier to use (less steps, less uncertainty as to what is being programmed).

How are you verifying that the hex file has not changed? Do the CRCs change? I assume you have selected to erase the flash.

Embedded Systems Academy, Inc.
support at esacademy dot com

Larry Robertson

The 98LPC922 program outputs a ascii string to the serial port.  This string does not change as it should with the new program.   I verified that the .HEX file selected contains the new string.

I did select the erase used flash blocks check box.

I did not check CRCs. :-(  I will do that in the morning.

-larry


Andy Ayre

Please let me know if the CRCs of the device match up with the new hex file or the old hex file after programming.

Embedded Systems Academy, Inc.
support at esacademy dot com

Larry Robertson

All blocks of the device CRC as 0x00000001 so CRC checking is not working correctly.

Security bits are set to 0x06 for blocks 0 & 7.  Block 0 is never changing boot code for our project.  All other blocks have security bits set to 0x00.  I verified this with the ISP/Read Security Bits... menu.

Is there any other reason CRC calculations would be incorrect?

Also if I erase blocks 1 through 6 via the ISP/Erase Flash... menu.  The program still runs!  So as you suspected the flash is not being erased.  It seems that either the 89LPC922 ISP firmware does know if the flash programmed correctly or FlashMagic is not reporting the error?

Is there a hardware reason that the part could program correctly the first time but not work a second time?


Andy Ayre

Strange. Please try the following:

Start FM
Press F1 to enter debug mode ([Debug] appears at the top)
Erase and program
Read the CRCs
Press F2 to exit debug mode
Email me the generated debug file C:\flashmagic.fmd
Delete the debug file

My email address is at the bottom of this post and in the Flash Magic Help About window.

Embedded Systems Academy, Inc.
support at esacademy dot com

erikm

you talk about REflash.

This "stinks" that the problem is that the chip does not go into ISP mode when you "kick" it.  A factory fresh chip is in ISP mode, once you have taken it out of that mode (run your program) it is your job to get it back in ISP mode.

I gave up on all this stuff ages ago and made NoTouch and have not had a problem since.

Read NoTouch (what) and use NoTouch for9xx(how) (both found at this website) and live happily ever after.

Erik