Forums

IAP problem

Started by icapapindi June 2, 2006
Hi !!

I'm trying to erase a sector with iap command with this code:

IAP iap_entry = (IAP) IAP_LOCATION;
disableIRQ();
command[0] = 0x50; // Command
command[1] = 0x10; // Sector
command[2] = 0x10; // Sector
iap_entry(command, result);

enableIRQ();

UART0WriteChar((char)result[0]);

And then I try to debug the result with UART, but after "iap_entry"
the program crash and I can't see anything in UART. Any idea??

Thanks !!!





An Engineer's Guide to the LPC2100 Series

page 183 of the user manuel.
command[1] = 0x10; // Sector <<-- 0 -> 15 (value in integer)
command[2] = 0x10; // Sector <<-- 0 -> 15 (value in integer)

----- Message d'origine ----
De : icapapindi
: l...
Envoyle : Vendredi, 2 Juin 2006, 6h03mn 09s
Objet : [lpc2000] IAP problem

Hi !!

I'm trying to erase a sector with iap command with this code:

IAP iap_entry = (IAP) IAP_LOCATION;
disableIRQ();
command[0] = 0x50; // Command
command[1] = 0x10; // Sector
command[2] = 0x10; // Sector
iap_entry(command, result);

enableIRQ();

UART0WriteChar((char)result[0]);

And then I try to debug the result with UART, but after "iap_entry"
the program crash and I can't see anything in UART. Any idea??

Thanks !!!







SPONSORED LINKS
Microcontrollers Microprocessor Intel microprocessors

Thanks for your reply,

I have test other iap commands and it always crash. I have test the
same code compiling with keil and it works good. I think I have a
problem with linker script or start up code but I don't know how to
solve it. Any idea?

Thanks in advance
--- In l..., Xedius Zolva wrote:
>
> page 183 of the user manuel.
> command[1] = 0x10; // Sector <<-- 0 -> 15 (value in integer)
> command[2] = 0x10; // Sector <<-- 0 -> 15 (value in integer)
>
> ----- Message d'origine ----
> De : icapapindi
> : l...
> Envoyle : Vendredi, 2 Juin 2006, 6h03mn 09s
> Objet : [lpc2000] IAP problem
>
> Hi !!
>
> I'm trying to erase a sector with iap command with this code:
>
> IAP iap_entry = (IAP) IAP_LOCATION;
> disableIRQ();
> command[0] = 0x50; // Command
> command[1] = 0x10; // Sector
> command[2] = 0x10; // Sector
> iap_entry(command, result);
>
> enableIRQ();
>
> UART0WriteChar((char)result[0]);
>
> And then I try to debug the result with UART, but after "iap_entry"
> the program crash and I can't see anything in UART. Any idea??
>
> Thanks !!!
>
>
>
>
>
>
>
> SPONSORED LINKS
> Microcontrollers
Microprocessor
Intel microprocessors

>