Flash Magic Forum

In-System Programming Support => LPC2xxx => Topic started by: maximb on December 29, 2010, 05:49:44 AM

Title: Firmware upgrade for LPC2368 - verifying problem
Post by: maximb on December 29, 2010, 05:49:44 AM
Hi, all.
I am trying to do firmware upgrade for my LPC2368-based board.
After entering the bootloader in ISP mode from my application, I run the FlashMagic to re-program the on-board flash memory.
But, the process fails at the verification stage (i.e. the programming was successful), the FlashMagic reports about a difference between data in HEX file and the stored value.
I have to say, that besides the bootloader code and application code (the application runs from flash without being copied to SRAM), I store some configuration parameters in the same on-board flash device. What I have noticed is, when I configure the FlashMagic to 'erase full Flash', the whole operation succeeds, and the application starts up after reset, but, of course, all the configuration parameters' values are lost and I have to re-configure a few dozens of values.
My target is to allow the in-field firmware upgrade and to preserve the configuration data.

What are your opinions about this ?

Thanking you in advance.

PS. I enclose the following information in case it is important:
- My OS is FreeRTOS
- Before re-invoke the bootloader in ISP mode, I disable all interrupts, suspend all the tasks, and configure the GPIO pin P2.10 to output low.
- The hardware watchdog is disabled.
- The RS232 rates I tried to work with are range from 9,600 to 230,400.
- I disable the CRP completely

Thanks for your time.
maximb
Title: Re: Firmware upgrade for LPC2368 - verifying problem
Post by: Andy Ayre on January 04, 2011, 01:17:56 AM
You need to look at the memory map of your firmware. If you are using the Keil compiler then you can find this in the .map file it produces. I would suspect that something is going into the flash sector that you have reserved for your configuration parameters and/or bootloader. Also try moving the sector for your configuration parameters higher in memory.