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

Not able to erase FLASH BANK A in lpc1837

Hi,

I am using LPC1837, I am using Flash Erase Page using IAP commands as follows

/* Erase page */ IAP.cmd = CMD_ERASE_PAGE; IAP.par[0] = u4l_flash_start_addr; IAP.par[1] = u4l_flash_end_addr; IAP.par[2] = u4g_Flash_Clk; /*180000*/ IAP_Call (&IAP.cmd, &IAP.stat);

This above command is working fine, when erasing/writing at FLASH BANK B. But When i am trying to erase flash bank A by giving its address, i am not able to erase. Actually the code execution hangs at line IAP_Call (&IAP.cmd, &IAP.stat);

My code resides at bank A in the range 0x1A000000 - 0x1A01FFFF. In scatter file i have done like following:

LR_IROM1 0x1A000000 0x00020000 { ; load region size_region ER_IROM1 0x1A000000 0x00020000 { ; load address = execution address *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) } RW_IRAM1 0x10000000 0x00008000 { ; RW data .ANY (+RW +ZI) } RW_IRAM2 0x10080000 0x0000A000 { ; RW data .ANY (+RW +ZI) } RW_IRAM3 0x20000000 0x00010000 { ; RW data .ANY (+RW +ZI) }
}

Also i tried with changing target options window in keil.

In Keil IDE, Options for Target->Target i checked/enabled the checkbox with IROM1 range 0x1A000000 with size 0x20000, Also tried with changing the size to 0x80000.

In all cases i am not able to erase the bank A of any pages of any sectors of Flash Bank A.

While debugging i found, the code execution hangs at IAP_Call (&IAP.cmd, &IAP.stat);

passing parameters are flash address and clock i verified. i hope it is correct, not able to
fix where the problem

Any suggestions would be appreciable

Thanks in Advance

Alagappan