Sign in

username:

password:



Not a member?

Search lpc2000



Search tips

Subscribe to lpc2000



lpc2000 by Keywords

2106 | ADC | ARM7 | Atmel | Bootloader | CAN | CrossStudio | CrossWorks | DDS | ECos | Ethernet | ETM | FIFO | FLASH | FPGA | GCC | GDB | GNU | GNUARM | GPIO | I2C | IAP | IAR | JTAG | Kickstart | LCD | Linux | LPC | LPC-E2294 | LPC2000 | LPC2100 | LPC2104 | Lpc2106 | Lpc210x | LPC2114 | LPC2119 | LPC2124 | LPC2129 | Lpc2138 | LPC213x | LPC21xx | LPC2210 | LPC2212 | LPC2214 | LPC2292 | LPC2294 | LPC2xxx | LPC3128 | MCB2100 | Olimex | Philips | PWM | Rowley | RTC | RTOS | SPI | SSP | UART | UART0 | UART1 | ULINK | USB | Watchdog | Wiggler

Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | LPC2000 | USB Bootloader for internal and external flash memory. LPC2478

Discussion group dedicated to the Philips LPC2000 family of ARM MCUs

USB Bootloader for internal and external flash memory. LPC2478 - eremitic193 - Sep 15 13:39:20 2009

Hello

I have implimented a USB Bootloader based on NXP AN10764. I am attempting to expand this bootloader to flash an application into internal and external flash memory. I am using an LPC2478 cpu and Spansion S29GL128N Flash memory. I have an application for my device which does use the external and internal flash. (But does not use the Bootloader) So I have verified that my hardware functions correctly. My concern is configuring the flash in the bootloader.

-If I configure the flash in the bootloader (as flash) I cannot write to it because I will get an abort. (As Per the LPC manual). Which is understandable. A co-worker had suggested that the flash could be configured as RAM and be written to with a programming algorithm similar to one used when programming via JTAG.

Does anyone have any suggestions as to what might be the best way to do this?

Thanks
------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )


Re: USB Bootloader for internal and external flash memory. LPC2478 - Himanshu Patel - Sep 16 3:36:57 2009

Hi,
=A0
You can not write flash when you are executing from flash. There are two al=
ternatives to the problem:
1 Copy/place flash access routines in the RAM and execute the same from RAM=
itself and rest of the program executes from flash itself.
2 On power on, copy entire boot loader to RAM and execute from the RAM.=20
=A0
You can decide based on availability of the RAM.
=A0
Regards,
=A0
Himanshu Patel

--- On Tue, 9/15/09, eremitic193 wrote:
From: eremitic193
Subject: [lpc2000] USB Bootloader for internal and external flash memory. L=
PC2478
To: l...@yahoogroups.com
Date: Tuesday, September 15, 2009, 6:38 PM
=A0=20

Hello

I have implimented a USB Bootloader based on NXP AN10764. I am attempting t=
o expand this bootloader to flash an application into internal and external=
flash memory. I am using an LPC2478 cpu and Spansion S29GL128N Flash memor=
y. I have an application for my device which does use the external and inte=
rnal flash. (But does not use the Bootloader) So I have verified that my ha=
rdware functions correctly. My concern is configuring the flash in the boot=
loader.

-If I configure the flash in the bootloader (as flash) I cannot write to it=
because I will get an abort. (As Per the LPC manual). Which is understanda=
ble. A co-worker had suggested that the flash could be configured as RAM an=
d be written to with a programming algorithm similar to one used when progr=
amming via JTAG.=20

Does anyone have any suggestions as to what might be the best way to do thi=
s?

Thanks
=20=20=20=20=20=20

[Non-text portions of this message have been removed]

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: USB Bootloader for internal and external flash memory. LPC2478 - Himanshu Patel - Sep 16 3:55:42 2009

Hi,=20
=A0
Please check whether LCP2478 has IAP functionality. If yes then you can mak=
e use of the same when running boot loader from internal flash memory.
=A0
Regards,
=A0
Himanshu Patel

--- On Wed, 9/16/09, Himanshu Patel wrote:
From: Himanshu Patel
Subject: Re: [lpc2000] USB Bootloader for internal and external flash memor=
y. LPC2478
To: l...@yahoogroups.com
Date: Wednesday, September 16, 2009, 8:36 AM
=A0=20

Hi,
=A0
You can not write flash when you are executing from flash. There are two al=
ternatives to the problem:
1 Copy/place flash access routines in the RAM and execute the same from RAM=
itself and rest of the program executes from flash itself.
2 On power on, copy entire boot loader to RAM and execute from the RAM.=20
=A0
You can decide based on availability of the RAM.
=A0
Regards,
=A0
Himanshu Patel

--- On Tue, 9/15/09, eremitic193 wrote:

From: eremitic193
Subject: [lpc2000] USB Bootloader for internal and external flash memory. L=
PC2478
To: lpc2000@yahoogroups .com
Date: Tuesday, September 15, 2009, 6:38 PM

=A0=20

Hello

I have implimented a USB Bootloader based on NXP AN10764. I am attempting t=
o expand this bootloader to flash an application into internal and external=
flash memory. I am using an LPC2478 cpu and Spansion S29GL128N Flash memor=
y. I have an application for my device which does use the external and inte=
rnal flash. (But does not use the Bootloader) So I have verified that my ha=
rdware functions correctly. My concern is configuring the flash in the boot=
loader.

-If I configure the flash in the bootloader (as flash) I cannot write to it=
because I will get an abort. (As Per the LPC manual). Which is understanda=
ble. A co-worker had suggested that the flash could be configured as RAM an=
d be written to with a programming algorithm similar to one used when progr=
amming via JTAG.=20

Does anyone have any suggestions as to what might be the best way to do thi=
s?

Thanks

[Non-text portions of this message have been removed]
=20=20=20=20=20=20

[Non-text portions of this message have been removed]

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: USB Bootloader for internal and external flash memory. LPC2478 - eremitic193 - Sep 16 8:49:34 2009

The LPC2478 does have IAP functionality which I am already using for flashi=
ng the internal flash.(from Ram) My bootloader functions correctly for prog=
ramming internal flash only. We have been doing some research and I believe=
I know how to configure the external flash to avoid the abort. (Only while=
in the bootloader) based on an example from NXP for NOR Flashes. In this e=
xample it appears that the EMC is configured so that the external device is=
not write protected. (In my case that device corresponds with CS0). The ex=
ample was found in a code bundle for lpc23xx and lpc24xx on NXPs website. I=
am going to hack up some tests as soon as I can and will post again after =
that.

-Eremitic193
(Zach)=20

--- In l...@yahoogroups.com, Himanshu Patel wrote:
>
> Hi,=20
> =A0
> Please check whether LCP2478 has IAP functionality. If yes then you can m=
ake use of the same when running boot loader from internal flash memory.
> =A0
> Regards,
> =A0
> Himanshu Patel
>=20
> --- On Wed, 9/16/09, Himanshu Patel wrote:
>=20
>=20
> From: Himanshu Patel
> Subject: Re: [lpc2000] USB Bootloader for internal and external flash mem=
ory. LPC2478
> To: l...@yahoogroups.com
> Date: Wednesday, September 16, 2009, 8:36 AM
>=20
>=20
> =A0=20
>=20
>=20
>=20
> Hi,
> =A0
> You can not write flash when you are executing from flash. There are two =
alternatives to the problem:
> 1 Copy/place flash access routines in the RAM and execute the same from R=
AM itself and rest of the program executes from flash itself.
> 2 On power on, copy entire boot loader to RAM and execute from the RAM.=20
> =A0
> You can decide based on availability of the RAM.
> =A0
> Regards,
> =A0
> Himanshu Patel
>=20
> --- On Tue, 9/15/09, eremitic193 wrote:
>=20
> From: eremitic193
> Subject: [lpc2000] USB Bootloader for internal and external flash memory.=
LPC2478
> To: lpc2000@yahoogroups .com
> Date: Tuesday, September 15, 2009, 6:38 PM
>=20
> =A0=20
>=20
> Hello
>=20
> I have implimented a USB Bootloader based on NXP AN10764. I am attempting=
to expand this bootloader to flash an application into internal and extern=
al flash memory. I am using an LPC2478 cpu and Spansion S29GL128N Flash mem=
ory. I have an application for my device which does use the external and in=
ternal flash. (But does not use the Bootloader) So I have verified that my =
hardware functions correctly. My concern is configuring the flash in the bo=
otloader.
>=20
> -If I configure the flash in the bootloader (as flash) I cannot write to =
it because I will get an abort. (As Per the LPC manual). Which is understan=
dable. A co-worker had suggested that the flash could be configured as RAM =
and be written to with a programming algorithm similar to one used when pro=
gramming via JTAG.=20
>=20
> Does anyone have any suggestions as to what might be the best way to do t=
his?
>=20
> Thanks
>=20
> [Non-text portions of this message have been removed]
>=20
>=20
>=20
>=20
>=20
>=20
>=20
>=20
>=20
>=20
>=20
>=20
>=20
>=20
>=20
>=20
>=20
>=20=20=20=20=20=20=20
>=20
> [Non-text portions of this message have been removed]
>
------------------------------------

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: USB Bootloader for internal and external flash memory. LPC2478 - eremitic193 - Sep 16 19:49:43 2009

The example in the code bundle was exactly what I needed. (EXTMEM). There i=
s obviously some changes that have to be made for a particular flash but th=
e basic idea was really helpful. So far I have been able to Read the mnf id=
and the device id from the flash. Do a full chip erase on the flash and wr=
ite some patterns to the flash. (Although when writing the pattern to the f=
lash every other 16 bit word does not appear to be written to. The NORFlash=
example only writes a single word write at a time so I will be implimentin=
g a page write version. So writing to the flash doesn't seem to be a huge p=
roblem. Now I just have to decide what I am going to do about handling mult=
iple BIN files. For those that don't know the example this bootloader works=
by acting as a mass storage device over the usb interface. The user copies=
a .bin file to the "drive" and flashing begins. I will have to modify the =
loader to know where to put which bin file (either use IAP for internal fla=
sh or programming algorithm for external flash). Will keep the forum posted=
with any progress.

-Zach

--- In l...@yahoogroups.com, "eremitic193" wrote:
>
> The LPC2478 does have IAP functionality which I am already using for flas=
hing the internal flash.(from Ram) My bootloader functions correctly for pr=
ogramming internal flash only. We have been doing some research and I belie=
ve I know how to configure the external flash to avoid the abort. (Only whi=
le in the bootloader) based on an example from NXP for NOR Flashes. In this=
example it appears that the EMC is configured so that the external device =
is not write protected. (In my case that device corresponds with CS0). The =
example was found in a code bundle for lpc23xx and lpc24xx on NXPs website.=
I am going to hack up some tests as soon as I can and will post again afte=
r that.
>=20
> -Eremitic193
> (Zach)=20
>=20
>=20
>=20
> --- In l...@yahoogroups.com, Himanshu Patel wrote:
> >
> > Hi,=20
> > =A0
> > Please check whether LCP2478 has IAP functionality. If yes then you can=
make use of the same when running boot loader from internal flash memory.
> > =A0
> > Regards,
> > =A0
> > Himanshu Patel
> >=20
> > --- On Wed, 9/16/09, Himanshu Patel wrote:
> >=20
> >=20
> > From: Himanshu Patel
> > Subject: Re: [lpc2000] USB Bootloader for internal and external flash m=
emory. LPC2478
> > To: l...@yahoogroups.com
> > Date: Wednesday, September 16, 2009, 8:36 AM
> >=20
> >=20
> > =A0=20
> >=20
> >=20
> >=20
> > Hi,
> > =A0
> > You can not write flash when you are executing from flash. There are tw=
o alternatives to the problem:
> > 1 Copy/place flash access routines in the RAM and execute the same from=
RAM itself and rest of the program executes from flash itself.
> > 2 On power on, copy entire boot loader to RAM and execute from the RAM.=
=20
> > =A0
> > You can decide based on availability of the RAM.
> > =A0
> > Regards,
> > =A0
> > Himanshu Patel
> >=20
> > --- On Tue, 9/15/09, eremitic193 wrote:
> >=20
> > From: eremitic193
> > Subject: [lpc2000] USB Bootloader for internal and external flash memor=
y. LPC2478
> > To: lpc2000@yahoogroups .com
> > Date: Tuesday, September 15, 2009, 6:38 PM
> >=20
> > =A0=20
> >=20
> > Hello
> >=20
> > I have implimented a USB Bootloader based on NXP AN10764. I am attempti=
ng to expand this bootloader to flash an application into internal and exte=
rnal flash memory. I am using an LPC2478 cpu and Spansion S29GL128N Flash m=
emory. I have an application for my device which does use the external and =
internal flash. (But does not use the Bootloader) So I have verified that m=
y hardware functions correctly. My concern is configuring the flash in the =
bootloader.
> >=20
> > -If I configure the flash in the bootloader (as flash) I cannot write t=
o it because I will get an abort. (As Per the LPC manual). Which is underst=
andable. A co-worker had suggested that the flash could be configured as RA=
M and be written to with a programming algorithm similar to one used when p=
rogramming via JTAG.=20
> >=20
> > Does anyone have any suggestions as to what might be the best way to do=
this?
> >=20
> > Thanks
> >=20
> > [Non-text portions of this message have been removed]
> >=20
> >=20
> >=20
> >=20
> >=20
> >=20
> >=20
> >=20
> >=20
> >=20
> >=20
> >=20
> >=20
> >=20
> >=20
> >=20
> >=20
> >=20=20=20=20=20=20=20
> >=20
> > [Non-text portions of this message have been removed]
>

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )