LPC15XX ReInvoke ISP

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by berrymccormick on Fri Jul 18 11:35:47 MST 2014
I'm working on an LPC1549 xpresso v2 board, and I'm trying to get the chip to go into ISP mode by using the ReInvoke ISP command.  I couldn't find any code for the LPC15XX, but I found some for the LPC11UXX, LPC13XX, etc.  I'm using the function below:

void ReinvokeISP(void)
  // make sure USB clock is turned on before calling ISP
  // make sure GPIO clocks are turned on before calling ISP
  // make sure IO configuration clock is turned on before calling ISP

  // make sure AHB clock divider is 1:1

  // Send Reinvoke ISP command to ISP entry point
  command[0] = 57;


  // Enter ISP. We call "iap_entry" to enter ISP because the ISP entry is done
  // through the same command interface as IAP.
  iap_entry(command, result);

  // Not supposed to come back!

The documentation for the chip simply says:

This command is used to invoke the boot loader in ISP mode. It maps boot
vectors and configures the peripherals for ISP. Which peripheral (UART, C_CAN,
UART, or USB) is selected for ISP mode depends on the parameter written with
this command.
This command may be used when a valid user program is present in the internal
flash memory and the ISP entry pins are not accessible to force the ISP mode.
Before calling this command, enable the clocks to the GPIO0/1/2 blocks in the

I know that the IAP portion of the code is working because I can read the part number with the lines below:

// Read Part Identification Number
command[0] = 54;// Read ID command code
iap_entry(command, result);

Also, I don't have any problem getting the chip to go into ISP mode when I use the reset button and the ISP buttons.

What am I missing?