Yahoo Groups archive

Lpc2000

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

Message

Re: [gmane.comp.hardware.arm.lpc2100] Partial (Less than 512 bytes) Flash Programming

2004-08-10 by Frank Sergeant

> Many group members have experimented with the IAP calls to write less 
> than 512 bytes of data. The follwing information and Q&A attempts to 
> address relevant concerns.

Regarding the discussion of writing 16 bytes at a time, is this for the
LPC2106 chip or for a different processor?

When calling the IAP routine to write 16 bits on an LPC2106, I get a
return code of 6, which per the manual is

    COUNT_ERROR    Byte count is not multiple of 4 or is
                   not a permitted value.

However, I *can* write 512 bytes at a time successfully.  (Yes, I am
preparing the sector in both cases.)

Are there some additional tricks to writing just 16 bytes at a time?

Perhaps I must copy any partial data from the 512-byte portion, extend
with my new 16 bytes, pad out to the end with 0xFF and then write 512
bytes (thus overwriting the beginning with what was already there, then
extending with my new data, then leaving the tail as all 0xFF)?

Is there a way to do it by calling the IAP routine with a length of 16
rather than with 512?


-- 
Frank

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.