Reply by Mike Harrison December 11, 20102010-12-11
On Sat, 11 Dec 2010 00:27:14 -0000, you wrote:

>For those interested:
>
>Some other things I had to do to get IAP re-invoke ISP to work on the LPC2468 included:
>
>MAM=0 (disabled)
>CLKSRCSEL=0 (RC osc)
>PCONP = defaults (ISP uses a peripheral I had turned off)
>
>I did not seem to need to set legacy mode for GPIO (clear bit 0 of SCS). I tried it with the bit set and clear and it worked both ways.

ISP doesn't use the IO ports so shouldn't be an issue.
An additional setup I had to do on LPC2136/01 was set the UART FDR to its reset default value
(0x10).

An Engineer's Guide to the LPC2100 Series

Reply by dave_albert December 10, 20102010-12-10
For those interested:

Some other things I had to do to get IAP re-invoke ISP to work on the LPC2468 included:

MAM=0 (disabled)
CLKSRCSEL=0 (RC osc)
PCONP = defaults (ISP uses a peripheral I had turned off)

I did not seem to need to set legacy mode for GPIO (clear bit 0 of SCS). I tried it with the bit set and clear and it worked both ways.

- Dave

--- In l..., "dave_albert" wrote:
>
> Thanks again Timo!
>
> I found my issue; it was the location I'd assigned for the stack on entry to the ISP. When I moved the stack to 0x40000100, it all worked perfectly. Thanks again to all who responded.
>
> Regards,
> Dave
>
> --- In l..., Timo wrote:
> >
> > On 12/10/2010 09:38 PM, dave_albert wrote:
> > > ...can you confirm that you successfully re-invoke the ISP using the
> > > IAP call with an LPC24xx processor?
> >
> > Yes, I can. It is LPC2478.
> >
> > --
> >
> > Timo
>

Reply by dave_albert December 10, 20102010-12-10
Thanks again Timo!

I found my issue; it was the location I'd assigned for the stack on entry to the ISP. When I moved the stack to 0x40000100, it all worked perfectly. Thanks again to all who responded.

Regards,
Dave

--- In l..., Timo wrote:
>
> On 12/10/2010 09:38 PM, dave_albert wrote:
> > ...can you confirm that you successfully re-invoke the ISP using the
> > IAP call with an LPC24xx processor?
>
> Yes, I can. It is LPC2478.
>
> --
>
> Timo
>

Reply by Timo December 10, 20102010-12-10
On 12/10/2010 09:38 PM, dave_albert wrote:
> ...can you confirm that you successfully re-invoke the ISP using the
> IAP call with an LPC24xx processor?

Yes, I can. It is LPC2478.

--

Timo
Reply by dave_albert December 10, 20102010-12-10
Hi Daniel,

In one of my follow-up posts I included the code I used to reset registers prior to invoking the IAP call...I (obviously) haven't found the magic register to reset yet. I am looking for confirmation from someone that it is possible to do this successfully on the LPC2468 (I have done it many times on LPC21xx); have you personally been able to re-invoke the ISP via the IAP call *on an LPC24xx processor* ?

Thanks and regards,
Dave

--- In l..., Daniel Widyanto wrote:
>
> Hi Dave,
>
> Before calling the IAP 'reinvoke ISP', you need to return the settings of the
> MCU as in reset mode (especially the clock / PLL settings).
>
> Regards,
> -daniel
> ----- Original Message ----
> From: dave_albert
> To: l...
> Sent: Fri, December 10, 2010 8:20:32 AM
> Subject: [lpc2000] Re: reinvoke ISP on LPC2468 ?
>
> Thank you Igor, unfortunately I am testing this from a very small application
> that never enables interrupts in the first place.
>
> BR,
> Dave
>
> --- In l..., Igor Skochinsky wrote:
> >
> > Hello dave_albert,
> >
> > Thursday, December 9, 2010, 11:44:15 PM, you wrote:
> >
> > d> I have spent considerable time on this without success on an LPC2468.
> > d> The IAP_reinvoke_ISP command clearly drops into the ISP and it
> > d> echoes '?' characters typed, but when it should be sending
> > d> "Synchronized", I get ASCII garbage (looks like a baud rate or other serial
> >parm mismatch).
> >
> > d> Is there a working code example for launching the ISP from code
> > d> for an LPC2468? Philips Apps, are there any errata on this?
> >
> > d> I've tried setting as much as possible to default conditions, if
> > d> anyone sees something obviously wrong, please let me know. Thanks!
> >
> > [snip]
> >
> > Try disabling the interrupts (I'm not seeing it in your code).
> >
> > d> (and yes, I've tried removing various blocks of the above code with no
> >success)
> >
> > d> Thanks for any help/suggestions!
> >
> >
> >
> > --
> > WBR,
> > Igor mailto:skochinsky@
>

Reply by dave_albert December 10, 20102010-12-10
Hi Timo,

Thanks for the reply; unfortunately, the ISP works perfectly when invoked from reset at any baud rate (at least up through 230kbps); this hardware is running over USB up to the target and only converts to serial just before it hits the processor so the impact of serial cabling on data rates isn't an issue.

The problem only happens when I re-invoke the ISP. I've tried down to 38.4kbps and no improvement...I think it is likely a timing problem. I've done this successfully with several of the LPC21xx series processors, but I'm having trouble with the LPC24xx parts. I was hoping someone had figured out exactly *which* registers need to be configured to their default states and could share that...otherwise, I'll just have to keep resetting registers until I find the one that's causing the problem.

However I'd like to confirm that it is possible (and not something that's going to show up in an NXP errata as non-functional)...can you confirm that you successfully re-invoke the ISP using the IAP call with an LPC24xx processor?

Thanks and regards,
Dave

--- In l..., Timo wrote:
>
> On 12/10/2010 12:44 AM, dave_albert wrote:
> > The IAP_reinvoke_ISP command clearly drops into the ISP and it echoes
> > '?' characters typed, but when it should be sending "Synchronized", I
> > get ASCII garbage (looks like a baud rate or other serial parm mismatch).
>
> I'm reinvoking ISP by doing little more than setting RC oscillator for
> CPU clock, and even that is mainly for FLASH-timings. That works for me
> at 115k2 baud.
>
> I have seen symptoms like your's with different PC serial ports and the
> cure has been to lower the baudrate. The behaviour had nothing to do
> with *reinvoking* the ISP, it happened with ISP invoked at RESET.
>
> --
>
> Timo
>

Reply by Timo December 10, 20102010-12-10
On 12/10/2010 12:44 AM, dave_albert wrote:
> The IAP_reinvoke_ISP command clearly drops into the ISP and it echoes
> '?' characters typed, but when it should be sending "Synchronized", I
> get ASCII garbage (looks like a baud rate or other serial parm mismatch).

I'm reinvoking ISP by doing little more than setting RC oscillator for
CPU clock, and even that is mainly for FLASH-timings. That works for me
at 115k2 baud.

I have seen symptoms like your's with different PC serial ports and the
cure has been to lower the baudrate. The behaviour had nothing to do
with *reinvoking* the ISP, it happened with ISP invoked at RESET.

--

Timo
Reply by Daniel Widyanto December 9, 20102010-12-09
Hi Dave,

Before calling the IAP 'reinvoke ISP', you need to return the settings of the
MCU as in reset mode (especially the clock / PLL settings).

Regards,
-daniel
----- Original Message ----
From: dave_albert
To: l...
Sent: Fri, December 10, 2010 8:20:32 AM
Subject: [lpc2000] Re: reinvoke ISP on LPC2468 ?

Thank you Igor, unfortunately I am testing this from a very small application
that never enables interrupts in the first place.

BR,
Dave

--- In l..., Igor Skochinsky wrote:
>
> Hello dave_albert,
>
> Thursday, December 9, 2010, 11:44:15 PM, you wrote:
>
> d> I have spent considerable time on this without success on an LPC2468.
> d> The IAP_reinvoke_ISP command clearly drops into the ISP and it
> d> echoes '?' characters typed, but when it should be sending
> d> "Synchronized", I get ASCII garbage (looks like a baud rate or other serial
>parm mismatch).
>
> d> Is there a working code example for launching the ISP from code
> d> for an LPC2468? Philips Apps, are there any errata on this?
>
> d> I've tried setting as much as possible to default conditions, if
> d> anyone sees something obviously wrong, please let me know. Thanks!
>
> [snip]
>
> Try disabling the interrupts (I'm not seeing it in your code).
>
> d> (and yes, I've tried removing various blocks of the above code with no
>success)
>
> d> Thanks for any help/suggestions!
>
> --
> WBR,
> Igor mailto:skochinsky@...

Reply by dave_albert December 9, 20102010-12-09
Thank you Igor, unfortunately I am testing this from a very small application that never enables interrupts in the first place.

BR,
Dave

--- In l..., Igor Skochinsky wrote:
>
> Hello dave_albert,
>
> Thursday, December 9, 2010, 11:44:15 PM, you wrote:
>
> d> I have spent considerable time on this without success on an LPC2468.
> d> The IAP_reinvoke_ISP command clearly drops into the ISP and it
> d> echoes '?' characters typed, but when it should be sending
> d> "Synchronized", I get ASCII garbage (looks like a baud rate or other serial parm mismatch).
>
> d> Is there a working code example for launching the ISP from code
> d> for an LPC2468? Philips Apps, are there any errata on this?
>
> d> I've tried setting as much as possible to default conditions, if
> d> anyone sees something obviously wrong, please let me know. Thanks!
>
> [snip]
>
> Try disabling the interrupts (I'm not seeing it in your code).
>
> d> (and yes, I've tried removing various blocks of the above code with no success)
>
> d> Thanks for any help/suggestions!
>
> --
> WBR,
> Igor mailto:skochinsky@...
>

Reply by Igor Skochinsky December 9, 20102010-12-09
Hello dave_albert,

Thursday, December 9, 2010, 11:44:15 PM, you wrote:

d> I have spent considerable time on this without success on an LPC2468.
d> The IAP_reinvoke_ISP command clearly drops into the ISP and it
d> echoes '?' characters typed, but when it should be sending
d> "Synchronized", I get ASCII garbage (looks like a baud rate or other serial parm mismatch).

d> Is there a working code example for launching the ISP from code
d> for an LPC2468? Philips Apps, are there any errata on this?

d> I've tried setting as much as possible to default conditions, if
d> anyone sees something obviously wrong, please let me know. Thanks!

[snip]

Try disabling the interrupts (I'm not seeing it in your code).

d> (and yes, I've tried removing various blocks of the above code with no success)

d> Thanks for any help/suggestions!

--
WBR,
Igor mailto:s...@mail.ru