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

NXP LPC17xx re-invoke booloader solved

I'm posting this in case it helps someone else someday.

I had been having a problem where an NXP LPC17xx part would boot fine if P2[10] was held low,
but would crash in the middle of using the bootloader if the re-invoke IAP command (command
57) was used.

A very kind person posted this previous thread in 2010. http://www.keil.com/forum/16503/

I ran into the same issue and might have taken much longer to solve it if it weren't for
that previous thread. The problem was that the RAM address used to temporarily store the
data being loaded into the flash happened to overlap the stack. The re-invoke IAP command
uses the existing stack, and it is the user's responsibility to select a RAM address that
does not conflict with it. The documentation doesn't warn about this.

Sure enough, once I moved the RAM buffer to avoid the stack, the re-invoke command started
working.