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

Discussion Groups | LPC2000 | flashing lpc2290

Discussion group dedicated to the Philips LPC2000 family of ARM MCUs

flashing lpc2290 - tscheiell - Nov 18 10:14:22 2007

Hi @all,

I think this questions are asked for several times, but I am unsure
about the solutions, so I hope that someone will be able to help me.

I have an lpc2290-board with external flash-memory and extrenal ram.
I want to change the code in the external flash.

So there are several themes - the iap and the isp and the flash-utility
from nxp also but that does not support the lpc2290.

I think lpc2290 does not support the iap-mode but with the isp it will
be possible to download code via serial-line, is this right ?

Is thera a mode to flash code to an extrenal flash or do i have to
write my own flash-algorith in order to program the external flash ?

does someone have an solution for that problem or does someone have an
idea how to solve my requierment ?

regards

Joe



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


Re: Re: flashing lpc2290 - Christian Klippel - Nov 18 12:46:54 2007

hi joe,

Am Sonntag, 18. November 2007 17:51 schrieb tscheiell:
> Hi Chris,
>
> thank You for the code, I checkt out the code and will try to get it
> working the next days.
> b.t.w. do you have some description how to use your tool or any
> docs ?
>
> regards
>
> Joe

./lpctool -h

that gives a help page ..... make sure to adapt the crt.s file to your needs,
all the init is done there (memory, pins, pll)

the code assumes 10 mhz crystal frequency, sorry for not having it a
commandline option yet. in lpctool.c, line 359 you can give it a different
frequency as the argument to openBootLoader().

an example command would be:

lpctool -v -i -d /dev/ttyS0 -e -a flash0.bin -A 0x82000000

that means: give some output as to what it does (-v), use the compiled-in
tool-binary to upload to ram (-i), use the device /dev/ttyS0 as serial port
(-d), erase the flash (-e), upload the file named flash0.bin (-a) and set the
start-address of the flash to 0x82000000 (-A).

if you have two flash chips connected you can upload the second one as well,
using -b and B for the filename & address, -E to erase the second flash.

if you have a binary-file that contains larger chunks of consectuive 0xFF
bytes, you can skip the during upload (since that is the default for the
erased flash) using -c for the first flash, and -C for the second.

it only accepts binary images for upload, you create them
with "arm-elf-objcopy -O binary yourfile.elf yourfile.bin",
replacing "yourfile" with the actual name you use.

you can use the serial-ports control lines DTR and RTS to toggle the reset and
eint line to enter the internal bootloader. DTR beeing for the eint-line, and
RTS beeing the reset-line. use a fet like the bs170 or a transistor like the
bc547 to pull the respective lines to gnd. this is verified to work on linux,
but gives problems at least in a vm running windows, since for some strange
reason it toggles these lines during the baudrate-switching. if in doupt, use
regular puschbuttons on the reset & eint lines to enter the lpc-internal
bootloader. see the datasheet of the controller for that.

again, you should remove lcd.c|h, fonty.c|h and charset.bits|info from the
project and remove all calls to their functions, since that is for displaying
some status info on the lcd screen, which you probably dont have. (it's a
128x160 pixel glcd with a ssd1854 controller). the lcd here is conneted to
the memory bus, using bank1 (0x81000000 base).

feedback about the tool is welcome, as well as improvements, so it might
become a handy tool for the lpc-using community, since i only have/use the
lpc2220 for now and thus the tool is somewhat tailored for that chip.

greets,

chris



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

Re: flashing lpc2290 - tscheiell - Nov 18 15:33:38 2007

Hi Chris,

thank You for the code, I checkt out the code and will try to get it
working the next days.
b.t.w. do you have some description how to use your tool or any
docs ?

regards

Joe

--- In l...@yahoogroups.com, Christian Klippel wrote:
>
> hello joe,
>
> Am Sonntag, 18. November 2007 16:01 schrieb tscheiell:
> > Hi @all,
> >
> > I think this questions are asked for several times, but I am
unsure
> > about the solutions, so I hope that someone will be able to help
me.
> >
> > I have an lpc2290-board with external flash-memory and extrenal
ram.
> > I want to change the code in the external flash.
> >
> > So there are several themes - the iap and the isp and the flash-
utility
> > from nxp also but that does not support the lpc2290.
> >
> > I think lpc2290 does not support the iap-mode but with the isp it
will
> > be possible to download code via serial-line, is this right ?
> >
> > Is thera a mode to flash code to an extrenal flash or do i have to
> > write my own flash-algorith in order to program the external
flash ?
> >
> > does someone have an solution for that problem or does someone
have an
> > idea how to solve my requierment ?
> >
> > regards
> >
> > Joe
>
> for a project here, using the lpc2220, i made a small uitility that
is
> uploaded to ram using the lpc internal bootloader, which in turn
programs the
> external flash.
>
> altough it's pretty much designed for the unit that i have here, it
shouldnt
> be too hard for you to adopt it for your needs.
>
> it runs on linux & windows. you probably want to remove all the lcd-
output
> stuff (i have a graphic-lcd connected to mem-address 0x80000000 and
> 0x80000001).
>
> it expects the flash to be connectcted to a 16 bit wide databus,
while the
> lowest addressbit is ad1.
>
> the code is in svn, under svn://svn.mamalala.org/lpctool/ in the
trunk.
>
> maybe this is a starting point for your own stuff. contact me off-
list if you
> have any more questions about it, so we dont need to spam this list
with bugs
> in my ugly code ;)
>
> greets,
>
> chris
>



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