Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

Struggling with LPC2138 IAP.

Struggling with LPC2138 IAP.

2005-11-15 by r_bottleneck

Hi,

I'm struggling with IAP of the LPC2138. I got some program
examples, but all fail . I'm getting  0x0000000C (prefetch aboard)
during execution  of

iap_entry (command,result);

As far as I can verify command and result are correct, 
as well as the address of IAP_LOCATION.

Could sombody advice or guess what's going wrong , please?

Thank you .

Re: [lpc2000] Struggling with LPC2138 IAP.

2005-11-15 by Tom Walsh

r_bottleneck wrote:

>Hi,
>
>I'm struggling with IAP of the LPC2138. I got some program
>examples, but all fail . I'm getting  0x0000000C (prefetch aboard)
>during execution  of
>  
>
Are you sure you are not calling it from Thumb code?  It might be that 
the IAP is ARM code and not Thumb.

TomW


-- 
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
----------------------------------------------------

Re: [lpc2000] Struggling with LPC2138 IAP.

2005-11-15 by Robert Adsett

At 05:50 PM 11/15/05 -0500, Tom Walsh wrote:
>r_bottleneck wrote:
>
> >Hi,
> >
> >I'm struggling with IAP of the LPC2138. I got some program
> >examples, but all fail . I'm getting  0x0000000C (prefetch aboard)
> >during execution  of
> >
> >
>Are you sure you are not calling it from Thumb code?  It might be that
>the IAP is ARM code and not Thumb.

Actually I belive it's the other way around Tom.  It is documented though 
and there is sample code around here for it somewhere.  Also if you search 
back through there have been multiple posts on this (almost word for word 
actually).

Hmm, someone should add it the FAQ page.  Just checked it actually is 
http://www.open-research.org.uk/ARMuC/index.cgi?LPC2100Tips

Robert


" 'Freedom' has no meaning of itself.  There are always restrictions,   be 
they legal, genetic, or physical.  If you don't believe me, try to chew a 
radio signal. "  -- Kelvin Throop, III
http://www.aeolusdevelopment.com/

Re: [lpc2000] Struggling with LPC2138 IAP.

2005-11-15 by Bill Knight

On Tue, 15 Nov 2005 17:50:05 -0500, Tom Walsh wrote:

>r_bottleneck wrote:

>>Hi,
>>
>>I'm struggling with IAP of the LPC2138. I got some program
>>examples, but all fail . I'm getting  0x0000000C (prefetch aboard)
>>during execution  of
>>  
>>
>Are you sure you are not calling it from Thumb code?  It might be that 
>the IAP is ARM code and not Thumb.


Actually the IAP is Thumb code, not ARM.  Take a look at the code I posted
in the files section on Yahoo.  'LPC-FlashRoutines-18Feb05.zip' may be of
use to you.

Regards
-Bill Knight
R O SoftWare &
http://www.theARMPatch.com

Re: Struggling with LPC2138 IAP.

2005-11-16 by r_bottleneck

> Actually the IAP is Thumb code, not ARM.  Take a look at the code I
posted
> in the files section on Yahoo.  'LPC-FlashRoutines-18Feb05.zip' may
be of

Thanks to all who answered to my question. 
Now it works!!

The reason for the exception I got was that the compiler I'm using
converted the HLL line 

              iap_entry(command,result);

in finally
                ...
              MOV PC,r3 
                ...
That caused the mentioned exception.

After I inserted a piece of ASM code containing finally

    ....
    BX r3
    ....

it works as expected.

Thanks again for your help, I appreciate it.

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.