Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

IAP Execution times

2004-08-28 by Mark Butcher

Hi All

Using IAP command I have just ported an S-record download utility to 
the (LPC2106).

When the first byte to be programmed is received, a 512 byte RAM 
buffer is mapped to the sector and 512 block of FLASH which it is 
destined for. The present FLASH contents are copied to the block.
The code to be programmed is then collected in this 512 byte RAM 
buffer until a byte for an address outside of the buffer range is 
received. This causes the 512 RAM block to be copied to the 
destination FLASH block (512 byte block in the destination sector) 
and a new RAM block is prepared.
[Generally the S-Rec contains addresses starting from the lowest 
address to the highest address without too much skipping about and 
so this tends to be efficient.]

After writing the code and debugging it I tried a download of a 
large S-Rec file of about 120k (from sector 0 to 14) and sent it at 
19'200b/s (LPC2106 PCLK running at 28MHz). All seemed to work well.

The code is operating from RAM at the moment, since I am working 
with a JTAG debugger, and so there are no problems with serial 
interrupts during the download.

Later the download code will be in sector 0 of the FLASH and so it 
will probably be necessary to disable interrupts during IAP commands 
(at least this is the simplest solution). What I am wondering though 
is how long the IAP routines actually take to execute and so what 
will be the limiting download speed that is possible without loosing 
serial characters?

In other words - how long does it take to execute the IAP command to 
copy 512 bytes [smallest block possible] of RAM to FLASH? Does this 
increase as the FLASH ages?

Is it advisable to operate the interrupts from RAM space during the 
download or is this complicating the matter for a simple download?

regards

Mark Butcher

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.