LPC11C24: IAP hangs - HELP

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by madid87 on Mon Sep 05 05:12:36 MST 2011
Hi all,
I'm having a bad time using IAP to update my firmware.

The new firmware is located in the upper part of the FLASH memory ((I have stored it there using IAP functions)), i.e. in sectors 4-7. (there are a total of eight 4kB sectors on LPC11C24). All of the code running is located in the lower sectors, i.e. 0 to 3.

The trouble comes when I try to copy the upper section of FLASH to the lower where my code is located. This is done by a function which executes from RAM memory as FLASH will be erased. First I prepare & erase sectors 0-3 and this goes well. Next I (again) prepare sector 0 (without trouble) and call the CopyRAMToFLASH IAP function. My program hangs in this function.

As I don't have a JTAG adapter it's very difficult to debug.

Please help. What could be the problem?


EDIT: Interrupts are disabled!