Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2000] Re: LPC2138FBD64 - not possible to run from Flash and use IAP?

2005-10-28 by Tom Walsh

Karl Olsen wrote:

>--- In lpc2000@yahoogroups.com, Richard Duits <yahoo@r...> wrote:
>  
>
>>Tom Walsh wrote:
>>
>>    
>>
>>>A lot of Flash does this, while the microcode sequencer inside the 
>>>flash memory is busy working with the flash array, it cannot be
>>>disturbed by the CPU core reading that same array.  Some flash
>>>memories are capable of allowing reading while the sequencer is
>>>busy writing / erasing some other part of the Flash array, but
>>>these types of Flash are more of an oddity than the normal flash 
>>>you find.
>>>      
>>>
>>I think the LPC2xxx have a flash that can read from the last block 
>>while erasing/programming another block, otherwise the IAP routines 
>>had be relocated to RAM before using them. It could also be that
>>the LPC2xxx has more RAM then specified in the datasheet and that
>>the bootcode relocates the IAP routines before jumping to the user 
>>program, but this seems more expensive and increases the startup
>>time.
>>    
>>
>
>Most probably, the whole flash is unreadable during programming, and 
>there is no secret RAM.  The User Manual says that the IAP commands 
>for write/erase use the top 32 bytes of RAM for execution, and that 
>you shouldn't use these bytes if you use write/erase IAP calls in 
>your program.  32 bytes should be enough for some Thumb code that 
>starts the write/erase, waits for it to finish, and returns to the 
>again accessible IAP code in flash.
>
>  
>
Yeah, I did the same with an 80C188 design + 28F010 Flash.  I put a 
small routine in RAM and then called that to do the erase / program 
stuff.  Then I could "stand back" until the Flash was available again 
and return to the caller (write protected block in Flash).

I suspect that is what Philips is doing, copying some Thumb code into 
those 32bytes to "stand back" until the current Flash operation has 
completed.

TomW


-- 
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
----------------------------------------------------

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.