Yahoo Groups archive

Lpc2000

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

Message

Re: difficulties at using IAP routines

2005-07-03 by cris_ullmann

Hi Tom,

thank you for your help. The result is still not my problem. I changed
that sometimes from reslut[1] to result[0].

The problem is, the programm sticks at the call of the IAS-routine.

Any idea??

Best regards  Cris
--- In lpc2000@yahoogroups.com, Tom Convent <ur_tom1977@y...> wrote:
> Hello Cris,
>  
>                  In your code result[1] contains the ID...you should
return result[1] instead of result[0]. results[0] only says the
cammand is sucess.
>  
> regards,
>  
> Tom
> 
> cris_ullmann <cris.ullmann@t...> wrote:
> Hello friends,
> 
> I'm still pretty unexperienced in programming the LPC2xxx processors. 
> I want read and write the internal flash using IAP. At first, I tried 
> to read the processor ID from the flash.
> 
> My code is:
> 
> int IAP_ID()
> {
> #define IAP_LOCATION 0x7FFFFFF1
> unsigned int command[5];
> unsigned int result[2];
> typedef void (*IAP)(unsigned int[],unsigned int[]);
> IAP iap_entry;
> 
> int ID;
> int Ergebnis;
>   __DISABLE_INTERRUPT();
> iap_entry=(IAP)IAP_LOCATION;
> command[0]=54;             //read par ID
> result[0]=0;
> iap_entry(command,result);
> Ergebnis=result[0];
> ID=result[1];
> return Ergebnis;
> } 
> 
> By the way, I use the ICCARM compiler, the boot loader version is 1.64
> 
> Is there anybody who can help me? As I learned from this forum, the 
> problem might laying in switching to the thumb mode when calling the 
> IAP-routine. Who do I have to do this?
> 
> Best regards
> 
> Cris
> 
> 
> 
> 
> 
> ---------------------------------
> YAHOO! GROUPS LINKS 
> 
> 
>     Visit your group "lpc2000" on the web.
>   
>     To unsubscribe from this group, send an email to:
>  lpc2000-unsubscribe@yahoogroups.com
>   
>     Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service. 
> 
> 
> ---------------------------------
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> [Non-text portions of this message have been removed]

Attachments

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.