David Yun

Entering ISP mode from user code with LPC11U68JBD48

Discussion created by David Yun on Feb 21, 2019
Latest reply on Mar 6, 2019 by Ricardo Delsordo

I'm using LPC11U68JBD48 microprocessor. I have a switch which toggles PIO0_1 pin. I can go into the ISP mode by pressing the switch and by applying power to the board (Resetting board).


Now I have my application code running and I would like to create a means to invoke the ISP USB MSD over my application so the toggle switch is not necessary. What I would like to do is that when I get a command from PC application by USB protocol, I would like my application (LP11U68) go into the SPI mode.
Is it possible with LPC11U68JBD48 microprocessor?

I'm using Chip_IAP_ReinvokeISP() function to make my application to go into the ISP USB mode.


What I have noticed so far:

1. If I call Chip_IAP_ReinvokeISP() very early in main function, it DOES go into the ISP mode, but if I put any delay (say 1 second), it doesn't go into the ISP mode.

2. When I set GPIO initialisation as below and call Chip_IAP_ReinvokeISP(), it does not go into the ISP mode.

LPC_IOCON->PIO0[1] &= 0;
LPC_IOCON->PIO0[1] |= (0x02<<3); /*internal pull up resistor*/

LPC_IOCON->PIO0[3] |= (1 << 0); /*set up of PIO0_3 register to USB_VBUS*/
LPC_IOCON->PIO0[3] |= (0 << 3); /*and inactive pull-up/pull-down resistors*/

3. I have tried everything above with LPC11U68 development board which has LPC11U68JBD100 and LPC4322JET100(Link 2), everything seems to be working fine.

Any help would be appreciated.