The IAP flash programming routines available in NXP's MCUs make use of some of the onchip RAM when executed. For example on the LPC1343 the top 32 bytes of onchip RAM are used. Thus if you are calling the IAP routines from your own application, you need to ensure that this memory is not used by your application.
By default this memory will be used by the application stack. However, if you are using the managed linker script mechanism, it is easy to modify the start position of the stack (remember that stacks grow down) to avoid this clash with the IAP routines. To do this go to: