I have problem with reinvoke isp command. At start i want imperf when I go into ISP mode by hold P2 at low level after reset everything work allright. I create project(~3kB) just to test reinvoke isp with uart. Fisrt, when I use function which call reinvoke isp at the begining of main function uC start ISP handler and I can use flash magic, but there are some limitations... I can use all commands but when I want to program uC with hex file which size is about 170kB flash magic stop after send few bytes and get info: "Operation Failed. (programming - failed to send data to device)". Below function which call reinvoke ISP:
#define IAP_LOCATION (0x1FFF1FF1)
unsigned int iap_command;
unsigned int iap_output;
typedef void (*IAP)(unsigned int ,unsigned int);
IAP iap_entry = (IAP)IAP_LOCATION;
iap_command = 57;
Second, I try to call ISP after send some special data by uart, but then uC dont go into isp mode. I dont know exacly "where" uC after this command is, becasue dont respond for flash magic commands, but it respond with some strange data when I send something by uart.
LPC1788, Red Suite 4(NXP Edition), CRP Disabled.
I have stack offset set at topRam - 32.