EmbeddedRelated.com
Forums

Firmwrae update LPC2378

Started by Fernando Augusto October 2, 2007
Hi,
i need to develop the firmware update for a project and was thinking on using the IAP. Basically i would made a second bootloader for our code, this boot will never be erased so even if a power fail, or any other (Murphys law like) thing hapenned during the update, ill be able to restart it later. Heres the problem,
ive suffered a lot with AT89S8253 (Atmel) where the flash got corrupted in an relative high frequence, (later they released an errata explaining some bugs that could corrupt the flash) so if this happens with LPC the ideia of the boatloader will fail, so will the idea of firm. update with IAP, and i will do it with ISP (puting another micro in series with the UART to update the LPC using ISP). I would be really thankful if someone can give some info about the LPC2378 flash and IAP problem, problems that ocurried, flasg being corrupted, any info will have value.

Thanks in advance,
Fernando Almeida

Abra sua conta no Yahoo! Mail, o ico sem limite de espa para armazenamento!





An Engineer's Guide to the LPC2100 Series

I use IAP in all my LPC projects/products, and it stores/updates parameters during each power down by the customer. I have never had a single problem yet with any products in the field after 2 years. But as a fail safe, the block of data I write to the Flash includes a signature DWORD both at the beginning and end of the block. When the product starts, it checks those sig DWORDs to see if they are correct. If not, then it initializes the data block to predefined values. There are a zillion potential scenarios one can think of that could still cause a problem. But I have yet to ever hear of a single product problem due to reprogramming flash.

We also supply the ability to upgrade the firmware in the MCUs by the customer, and that has never been a problem either. And many have used it, since we did release firmware updates. Obviously if the power goes down while the customer is changing the firmware, that will cause a return to factory for reprogramming. But it's never happened yet. There is only a window of about 120 seconds updating the firmware. Kind of like being struck by lightening. Yeah it can happen, but I'm not going to spend much time worrying about it.

Chris.
Hi Chris,

In our product we are using LPC2132 with 64K flash.

We need to do a firmware update by receiving the image(Hex file) in packets on I2C1 bus from another master device.

We are able to get the full image in packets and write to the flash but when we do a reboot the micro is executing the unchanged startup code and going to Data abort mode.

I have taken care to maintain the location of main entry same as that of the overwritten image.

Could you please suggest us the possible errors that we would have done.

Thanks,
Dinesh.

Hi,
> i need to develop the firmware update for a project and was thinking on u>sing the IAP. Basically i would made a second bootloader for our code, this> boot will never be erased so even if a power fail, or any other (Murphy>s law like) thing hapenned during the update, ill be able to restart it >later. Heres the problem,
> ive suffered a lot with AT89S8253 (Atmel) where the flash got corrupte>d in an relative high frequence, (later they released an errata explaining >some bugs that could corrupt the flash) so if this happens with LPC the ide>ia of the boatloader will fail, so will the idea of firm. update with IAP, >and i will do it with ISP (puting another micro in series with the UART to >update the LPC using ISP). I would be really thankful if someone can give s>ome info about the LPC2378 flash and IAP problem, problems that ocurried, >flasg being corrupted, any info will have value.
>
> Thanks in advance,
> Fernando Almeida
>
> Abra sua conta no Yahoo! Mail, o ico sem limite de espa para> armazenamento!
>
>
>
>
>
>
>
syed ismail wrote:
>
> Hi,
>
> 1. Did you erase the flash blocks?
> 2. You have to write in 256 byte blocks (minimum) for 213x.
>
3. You need to setup JTAG debugging so that you identify a problem.

TomW
--
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net http://cyberiansoftware.com http://openzipit.org
"Windows? No thanks, I have work to do..."
----------------
Hi Syed/TomW,

Iam able to erase the flash blocks from sector 3 to 7 and able to write
the packets of the code (The new code(simple test code) is smaller than
the original code).

And writing to the flash in 1024 blocks.

Also if I erase sector 8, the microcontroller is hanging.

Thanks for your concern. Waiting for your further suggestions.

Thanks,

Dinesh.

________________________________

From: l... [mailto:l...] On Behalf
Of Tom Walsh
Sent: Wednesday, November 07, 2007 9:22 PM
To: l...
Subject: Re: [lpc2000] Re: Firmwrae update LPC2378

syed ismail wrote:
>
> Hi,
>
> 1. Did you erase the flash blocks?
> 2. You have to write in 256 byte blocks (minimum) for 213x.
>
3. You need to setup JTAG debugging so that you identify a problem.

TomW

--
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net
http://cyberiansoftware.com
http://openzipit.org
"Windows? No thanks, I have work to do..."
----------------

DISCLAIMER:
-----------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.

-----------
Hi Syed,

Iam able to erase the flash blocks from sector 3 to 7 and able to write
the packets of the code (The new code(simple test code) is smaller than
the original code).

And writing to the flash in 1024 blocks.

Also if I erase sector 8, the microcontroller is hanging.

Thanks for your concern. Waiting for your further suggestions.

Thanks,

Dinesh.

________________________________

From: l... [mailto:l...] On Behalf
Of syed ismail
Sent: Tuesday, November 06, 2007 10:44 AM
To: l...
Subject: Re: [lpc2000] Re: Firmwrae update LPC2378

Hi,

1. Did you erase the flash blocks?
2. You have to write in 256 byte blocks (minimum) for 213x.

Syed

d...@hcl.in wrote: Hi Chris,

In our product we are using LPC2132 with 64K flash.

We need to do a firmware update by receiving the image(Hex file) in
packets on I2C1 bus from another master device.

We are able to get the full image in packets and write to the flash but
when we do a reboot the micro is executing the unchanged startup code
and going to Data abort mode.

I have taken care to maintain the location of main entry same as that of
the overwritten image.

Could you please suggest us the possible errors that we would have done.

Thanks,
Dinesh.

Hi,
> i need to develop the firmware update for a project and was thinking
on u>sing the IAP. Basically i would made a second bootloader for our code,
this> boot will never be erased so even if a power fail, or any other
(Murphy>s law like) thing hapenned during the update, ill be able to restart
it >later. Heres the problem,
> ive suffered a lot with AT89S8253 (Atmel) where the flash got
corrupte>d in an relative high frequence, (later they released an errata
explaining >some bugs that could corrupt the flash) so if this happens with LPC the
ide>ia of the boatloader will fail, so will the idea of firm. update with
IAP, >and i will do it with ISP (puting another micro in series with the UART
to >update the LPC using ISP). I would be really thankful if someone can
give s>ome info about the LPC2378 flash and IAP problem, problems that
ocurried, >flasg being corrupted, any info will have value.
>
> Thanks in advance,
> Fernando Almeida
>
> Abra sua conta no Yahoo! Mail, o ico sem limite de espa para> armazenamento!
>
>
>
>
>
>
>

__________________________________________________




DISCLAIMER:
-----------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.

-----------