9 years, 5 months ago.

How do I reinvoke ISP from a program

I'd like to implement a way to trigger the ISP bootloader from my own program by some kind of special command. Clarification: I'm fairly confident about the "IAP" calling mechanism but I'm not so clear about the clock configuration implications. EDIT: as I would like to restart it with the default internal clock and not an external one or crystal END EDIT

From what I've read there are some libraries that provide the full IAP functionality, which would work but seems excessive when I only need one command and it will never return.

I've had a look at the Sam Grove demonstration: https://developer.mbed.org/users/sgrove/code/Re-InvokeISP/

It looks as if I could just rename "main" and turn it into a library but it also includes a section programming the clock and I believe that is specific to the LPC1768...

I understand that for ISP the clock does need reconfiguring to internal RC. From the way I read it the manual seems to be saying that if I branch to the bootloader using IAP it will carry on using the current clock settings which might not be the normal ISP ones. I get the impression from other sources e.g. lpc21isp documentation that the clock configuration for ISP is important as lpc21isp expects to be given the clock frequency in kHz as a parameter.

I tried to read UM10360 and there seem to be some contradictions between the ISP documentation and the oscillator documentation. The ISP description talks about a clock of "CCLK = 14.748 MHz" but from chapter 4 the IRC frequency is nominally 4MHz and it looks as if power-on defaults are PLL off?

Hi Oliver - It sounds like you've answered a lot of your own questions. Using the IAP library is nice as it exposes a lot of other methods but the small snippet you've found may be just what you need.

posted by Sam Grove 06 Apr 2016
Be the first to answer this question.