IAP lpc2294 Copy2Ram problem
2005-09-02 by mpwalter2005
Hi everybody,
some problem during using the IAP functions of the lpc2294. I have
wrote this sample code:
int iFlashRAMCopy (unsigned long DestinationFlashAddress, unsigned
long SourceRAMAddress,
unsigned int BytesToWrite, unsigned long
ProcFrequency, unsigned char StartSector, unsigned char EndSector)
{
unsigned long command[5];
unsigned long result[2] = {0,0};
disable_interrupt();
command[0] = FLASH_PREPARE_SECTOR_TO_WRITE;
command[1] = StartSector;
command[2] = EndSector;
command[3] = ProcFrequency;
iap_entry (command, result);
if (CMD_SUCCESS == *result)
{
command[0] = FLASH_COPY_TO_RAM;
command[1] = DestinationFlashAddress;
command[2] = SourceRAMAddress;
command[3] = BytesToWrite;
command[4] = ProcFrequency;
iap_entry (command, result);
}
enable_interrupt();
return (CMD_SUCCESS == *result);
everytime when i try now to copy a part from the ram eg 0x81000000 to
flash eg. 0x4000 the second iap_entry call me the error 4 - "mapping
error" - whats wrong ? My program runs on external mem at 0x81000000!
Greetings
M. Walter