--- In l..., "Brendan Murphy"
wrote: >
> --- In l..., "dauzat_lilian"
> wrote:
> >
> > Thanks for your answer but assuming the fact that I don't want to use > > LPC2000 flash utility, how do it is possible to use
ISP? I would like > > to download new code from an external memory to the
LPC using another > > microcontroler connected to the LPC and to the
external memory.
> > Is it possible to create on PC a "ready to send" file that I could > > put on my external memory and then send it byte per
byte in the
> > flash ?
> >
> > Thanks
> > Lilian
> > You don't have to use the LPC2000 flash utility to program: any program > that meets the interface spec can do the job -
there's quite a few
> alternatives already (see the Files section for a couple).
>
> Personally, though, if you're programming it from another micro, I'd be > inclined to put a small loader on the LPC part and
have it talk to the > programming part: the ISP interface isn't
particularly simple to
> program from another micro. By the time you program something to meet > the ISP interface, you'd just as easily program
IAP.
>
> Come to think of it why do you need a 2nd micro? I'd just leave it out > and attach the external memory direct (i.e. bite the
bullet and make > the IAP calls: they're not that difficult).
>
> Brendan
>
Hello Brendan
Thanks you for these informations.
Concerning the second micro I need it because it contains special
features (audio processing particulary that the LPC don't have.
I confirm that the version lpc21isp-148 compiles and works just fine
on MacOS 10.4 (PPC G4) and on Linux (debian on IXP425 = ARM v5 little
endian).
In both case lpc21isp is talking to the device via an USB to serial
adapter.
There is a small wrinkle on the mac though: with the adapter (only
solution since there is no serial port), it will always assert RTS
which may put the board in ISP mode even when unwanted. My
workaround: disable the RTS to P0.14 connection and assert P0.14
manually when programming. > There is a version of LPC21ISP.c in the Files
section. It is older
> that the version I am using which is 1.31. I don't recall where I got
> it but probably via Google.
>
> In any event, this is the one I use in my makefiles to program the
> device. It is written in C and may be portable to some other
> processor than the PC but reworking 2580 lines of code is a chore.
>
> Richard
Reply by Michael Nelson●May 16, 20072007-05-16
Lilian:
IAP would have to be executed once per sector.
Sectors on the LPC210x parts are 4 Kbytes.
Flash on the LPC2103 is 32 Kbytes.
IAP would have to be executed _8_ times.
If IAP looks like a nightmare to you, use ISP.
Regards:
Mike Nelson, Office: 408-579-3048, Mobile: 650-291-7343
_____
From: l... [mailto:l...] On Behalf Of
dauzat_lilian
Sent: Wednesday, May 16, 2007 2:37 AM
To: l...
Subject: [lpc2000] Difference between ISP and IAP
Hello,
I'm working on a LPC2103 with IAR compiler and I'm looking at the best
method to reprogram its flash code memory using UART. I checked the
AN10356 and AN10256 from NXP, browsed forums and groups and I still
don't know which is the best method.
ISP seems to be simpler since I understood that the bootloader is able
to performed all the work while IAP look like a nightmare.
What I understood about IAP, is that I will have to execute it 4 times
to reprogram the whole flash since the RAM size is 8Kb and Flash size
is 32Kb (4x8Kb2Kb).
Note: I'm able to control P0.14 in my system.
Could anyone help me ?
Thanks !!
Lilian
Reply by rtstofer●May 16, 20072007-05-16
--- In l..., "dauzat_lilian" wrote: >
> Thanks for your answer but assuming the fact that I don't want to use
> LPC2000 flash utility, how do it is possible to use ISP? I would like
> to download new code from an external memory to the LPC using another
> microcontroler connected to the LPC and to the external memory.
> Is it possible to create on PC a "ready to send" file that I could
> put on my external memory and then send it byte per byte in the
> flash ?
>
> Thanks
> Lilian
>
There is a version of LPC21ISP.c in the Files section. It is older
that the version I am using which is 1.31. I don't recall where I got
it but probably via Google.
In any event, this is the one I use in my makefiles to program the
device. It is written in C and may be portable to some other
processor than the PC but reworking 2580 lines of code is a chore.
Richard
Reply by Brendan Murphy●May 16, 20072007-05-16
--- In l..., "dauzat_lilian"
wrote: >
> Thanks for your answer but assuming the fact that I don't want to use
> LPC2000 flash utility, how do it is possible to use ISP? I would like
> to download new code from an external memory to the LPC using another
> microcontroler connected to the LPC and to the external memory.
> Is it possible to create on PC a "ready to send" file that I could
> put on my external memory and then send it byte per byte in the
> flash ?
>
> Thanks
> Lilian
>
You don't have to use the LPC2000 flash utility to program: any program
that meets the interface spec can do the job - there's quite a few
alternatives already (see the Files section for a couple).
Personally, though, if you're programming it from another micro, I'd
be
inclined to put a small loader on the LPC part and have it talk to the
programming part: the ISP interface isn't particularly simple to
program from another micro. By the time you program something to meet
the ISP interface, you'd just as easily program IAP.
Come to think of it why do you need a 2nd micro? I'd just leave it out
and attach the external memory direct (i.e. bite the bullet and make
the IAP calls: they're not that difficult).
Brendan
Reply by dauzat_lilian●May 16, 20072007-05-16
Thanks for your answer but assuming the fact that I don't want to use
LPC2000 flash utility, how do it is possible to use ISP? I would like
to download new code from an external memory to the LPC using another
microcontroler connected to the LPC and to the external memory.
Is it possible to create on PC a "ready to send" file that I could
put on my external memory and then send it byte per byte in the
flash ?
Thanks
Lilian
--- In l..., "drbernchesters"
wrote: > Using ISP with the LPC2000 Flash Utility (version
2.2.3) is far easier > than creating your own IAP routines because
everything is done already. > It can also control the RST and P0.14 pins on your
LPC2103 so that you > just have to push one button on the program and it
resets, programs, and > then runs your code on the 2103 automatically.
>
> Brennen
> --- In l..., "dauzat_lilian"
> wrote:
> >
> > Hello,
> >
> > I'm working on a LPC2103 with IAR compiler and I'm looking at the
best > > method to reprogram its flash code memory using
UART. I checked the > > AN10356 and AN10256 from NXP, browsed forums and
groups and I still > > don't know which is the best method.
> > ISP seems to be simpler since I understood that the bootloader is able > > to performed all the work while IAP look like a
nightmare.
> > What I understood about IAP, is that I will have to execute it 4 times > > to reprogram the whole flash since the RAM size is
8Kb and Flash size > > is 32Kb (4x8Kb2Kb).
> >
> > Note: I'm able to control P0.14 in my system.
> >
> > Could anyone help me ?
> >
> > Thanks !!
> > Lilian
>
Reply by drbernchesters●May 16, 20072007-05-16
Using ISP with the LPC2000 Flash Utility (version 2.2.3) is far easier
than creating your own IAP routines because everything is done already.
It can also control the RST and P0.14 pins on your LPC2103 so that you
just have to push one button on the program and it resets, programs, and
then runs your code on the 2103 automatically.
Brennen
--- In l..., "dauzat_lilian"
wrote: >
> Hello,
>
> I'm working on a LPC2103 with IAR compiler and I'm looking at the
best
> method to reprogram its flash code memory using UART. I checked the
> AN10356 and AN10256 from NXP, browsed forums and groups and I still
> don't know which is the best method.
> ISP seems to be simpler since I understood that the bootloader is able
> to performed all the work while IAP look like a nightmare.
> What I understood about IAP, is that I will have to execute it 4 times
> to reprogram the whole flash since the RAM size is 8Kb and Flash size
> is 32Kb (4x8Kb2Kb).
>
> Note: I'm able to control P0.14 in my system.
>
> Could anyone help me ?
>
> Thanks !!
> Lilian
>
Reply by dauzat_lilian●May 16, 20072007-05-16
Hello,
I'm working on a LPC2103 with IAR compiler and I'm looking at the best
method to reprogram its flash code memory using UART. I checked the
AN10356 and AN10256 from NXP, browsed forums and groups and I still
don't know which is the best method.
ISP seems to be simpler since I understood that the bootloader is able
to performed all the work while IAP look like a nightmare.
What I understood about IAP, is that I will have to execute it 4 times
to reprogram the whole flash since the RAM size is 8Kb and Flash size
is 32Kb (4x8Kb2Kb).