This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Flash Copy Fails with error IAP_CMD_COPY_RAM_TO_FLASH

Target uP: LPC2364

When copying to Flash, the copy fails if the source address iapCommand[2] points to address 0x7FD00000 range. The same source code succeeds if the source address is in the 0x4000000 range. It throws a source address not mapped error.

Setup:
IRAM1 0x40000000 0x2000
IRAM2 0x7fd00000 0x20000

What causes this?

Code snippet

iapCommand[0] = IAP_CMD_COPY_RAM_TO_FLASH;
iapCommand[1] = NV_START_ADDRESS + i * sizeof(m_flashRam);
iapCommand[2] = (uint)(m_flashRam);
iapCommand[3] = sizeof(m_flashRam);
iapCommand[4] = CCLK_KHZ;
memset(iapResult, 0, sizeof(iapResult));
IAPEntry( iapCommand, iapResult );
if ( iapResult[0] == IAP_RET_SRC_ADDR_NOT_MAPPED )
{
    dprintf( "Copy to Flash Failed");
}

0