LPC1343: Invoking USB Bootloader from firmware?

Looking at the LPC1343 user manual, you can invoke the ISP mode from the user application (Reinvoke ISP, Section 19.14.8), however it doesn’t appear you can re-invoke the USB Bootloader MSC device.

Is there a way to do this beyond either erasing the flash interrupt vectors and reseting (making an invalid applicaion), or physically toggling the required pin?

I wondered if IAP command 57, “Reinvoke ISP”, would respect PIO3_0 being HIGH to indicate USB MSC mode instead of UART ISP. Although the data sheet does not mention the USB boot loader in the Reinvoke ISP command description, there’s a possibility that it might look at PIO3_0. Although maybe not since it probably jumps straight to the ISP command handler (maybe entering the boot process flow chart at the auto-baud point?).

You could do it with some hardware… a capacitor and resistor to provide a delayed pull-down of PIO0_1 by your program while your program requests a Cortex-M3 reset by setting VECTRESET in the AIRCR of the NVIC.

I’ve thought of the RC circuit on the PIO3_0 pin (which is forcing the MSC update mode). It would also allow the errata workaround (writing 0 to specific SRAM address). It seems rather hokey, but of course is an option :slight_smile:

I don’t have hardware in front of me right now to test with - I’m trying to figure out the best strategy before I end up with a bunch of Z wires.

BTW, there’s an example of the RC circuit on the ISP pin in the [microBuilder.eu LPC1343 Reference Design schematic (see top left corner of schematic).](http://www.microbuilder.eu/Images/Projects/lpc1343_refdesign_schematic.png)