EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

fastest flash prog speed for LPC2138?

Started by kotex_m3 July 17, 2006
Looking at a LPC2138 as a possibility to create specialized mgmt boxes
for racing hobbyist. With out getting into the details we need the
ability to completely reprogram a device in the pits. Does anyone have
a feel for how long it takes to program a LPC2138 (or even the LPC2136)
with a full 500k ish image over JTAG? Our eval boards are coming up
slower than expected let alone the effort to optimize and refine.

Hopefully someone has some time measurements already recorded and could
share..

Thx a million,

KoTex Racing

An Engineer's Guide to the LPC2100 Series

KoTex Racing,

Using JTAG (ULINK from Keil) it takes about 30-35sec to program, not
counting the verify. Using a SuperPro 3000U and socket adapter, it
takes about 20-25sec for the same program, around 500Kb on a LPC2138.
Either method is much faster than using UART0 bootrom!

Greg

> Does anyone have
> a feel for how long it takes to program a LPC2138 (or even the LPC2136)
> with a full 500k ish image over JTAG?
Hi,

Using Rowley CrossConnect and CrossWorks it takes about 15 seconds. I've
included the log from the target window.

Regards
Michael

Erasing
Erasing completed in 2.1 s 242,847 bytes/sec
Programming
Programming 493.7 KB of addresses 00000000 0007b707
Programming completed in 12.1 s 41,858 bytes/sec
Download complete
Verifying debugio.elf on USB CrossConnect for ARM-RTCK
Verifying
Verifying 493.7 KB of addresses 00000000 0007b707
Verifying completed in 694 ms 728,541 bytes/sec
Verify complete
> KoTex Racing,
>
> Using JTAG (ULINK from Keil) it takes about 30-35sec to program, not
> counting the verify. Using a SuperPro 3000U and socket adapter, it
> takes about 20-25sec for the same program, around 500Kb on a LPC2138.
> Either method is much faster than using UART0 bootrom!
>
> Greg
>
>
>> Does anyone have
>> a feel for how long it takes to program a LPC2138 (or even the LPC2136)
>> with a full 500k ish image over JTAG?
>>
>
>
--- In l..., Michael Johnson wrote:

> Erasing completed in 2.1 s 242,847 bytes/sec

Shouldn't this be 400ms?

Jaya





This is how long it takes using Rowley CrossWorks and CrossConnect. The
number(s) include all the host software and USB comms overhead.

Michael
> --- In l..., Michael Johnson wrote:
>
>
>> Erasing completed in 2.1 s 242,847 bytes/sec
>>
>
> Shouldn't this be 400ms?
>
> Jaya
>
>
>
Hi,

> > Erasing completed in 2.1 s - 242,847 bytes/sec
>
> Shouldn't this be 400ms?

Jaya, don't try to be smart. You might know that you can erase the
device in 400ms, but I know what CrossWorks is timing. That time is the
time required to reset the CPU, gain control over JTAG, to downloading a
program into RAM over JTAG, figuring out how much of the device needs to
be erased, erasing the selected sectors on the device (using a single
ISP command in many instances), to confirm device erasure, and to update
the GUI whilst all this is happening.

Why should that be 400ms?

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors

--- In l..., "Paul Curtis" wrote:
>
> Hi,
>
> > > Erasing completed in 2.1 s - 242,847 bytes/sec
> >
> > Shouldn't this be 400ms?
>
> Jaya, don't try to be smart. You might know that you can erase the
> device in 400ms, but I know what CrossWorks is timing. That time is the
> time required to reset the CPU, gain control over JTAG, to downloading a
> program into RAM over JTAG, figuring out how much of the device needs to
> be erased, erasing the selected sectors on the device (using a single
> ISP command in many instances), to confirm device erasure, and to update
> the GUI whilst all this is happening.
>
> Why should that be 400ms?
>
> --
> Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
> CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors

Paul, no need to get defensive.

To setup serial communications, download 400-byte program, run it to
fetch some 80-byte, format and print these takes me 1.5 seconds.

If I added erase and check blank to this, I reckon I would take just
over 2s.

May be I am wrong but I was under the impression JTAG allows you to do
such things orders of magnitude faster.

Jaya
I program a 132KB file to an LPC2138 for 1.3 sec. which is about
100KB/s using the Ronetix PEEDI JTAG emulator/programmer. So
programming of 500KB should take about 5 seconds...

Jaya,

> > > > Erasing completed in 2.1 s - 242,847 bytes/sec
> > >
> > > Shouldn't this be 400ms?
> >
> > Jaya, don't try to be smart. You might know that you can erase the
> > device in 400ms, but I know what CrossWorks is timing.
> That time is
> > the time required to reset the CPU, gain control over JTAG, to
> > downloading a program into RAM over JTAG, figuring out how
> much of the
> > device needs to be erased, erasing the selected sectors on
> the device
> > (using a single ISP command in many instances), to confirm device
> > erasure, and to update the GUI whilst all this is happening.
> >
> > Why should that be 400ms?
> >
> > --
> > Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
> > CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors
>
> Paul, no need to get defensive.
>
> To setup serial communications, download 400-byte program,
> run it to fetch some 80-byte, format and print these takes me
> 1.5 seconds.
>
> If I added erase and check blank to this, I reckon I would
> take just over 2s.
>
> May be I am wrong but I was under the impression JTAG allows
> you to do such things orders of magnitude faster.

JTAG goes as fast as the device operates with RTCK on the LPC. Besides,
there is USB overhead as Michael pointed out. Round-trip times for USB
are fairly slow.

The erase timing in this case is not pertinent; the programming time
was.

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors

Hi,

Sounds impressive. If you declare

static const char array[300*1024] = { 0x34 };

and then reference the array

array[0]

in your program then you can get numbers for bigger downloads.

Regards
Michael
> I program a 132KB file to an LPC2138 for 1.3 sec. which is about
> 100KB/s using the Ronetix PEEDI JTAG emulator/programmer. So
> programming of 500KB should take about 5 seconds...
>
>
>

The 2024 Embedded Online Conference