Hi Joel,
My MEMMAP EQU 0XE01FC040
but I can't find my MEMMAP_FLASH.
is this something you define? right
if so I am using the LPC2138, therefore it should be the beginning of my code?
Thanks
Joel Winarske <joelw@...> wrote:
I have example project for IAR. It uses the code as listed below.
Joel
> Hi Joe,
> I got it work but as soon as I turn on any interrupt it hang.
> do you have some thing that works already?
> thanks
>
> --- In lpc2000@yahoogroups.com, "Joel Winarske" <joelw@i...> wrote:
> >
> > This code works:
> > http://groups.yahoo.com/group/lpc2000/files/EE_demo.zip
> > (code here modified from original)
> >
> > unsigned int command_iap[5];
> > unsigned int result_iap[3];
> > unsigned char memmap;
> >
> > __disable_interrupt();
> > memmap = MEMMAP; // get current memory map
> > MEMMAP = MEMMAP_FLASH; // map User Flash into low 64 bytes
> >
> > command_iap[0]=50; //prepare sectors for erase
> > command_iap[1]=EE_SEC_L;
> > command_iap[2]=EE_SEC_H;
> > iap_entry=(IAP) IAP_LOCATION;
> > iap_entry(command_iap,result_iap);
> >
> > command_iap[0]=52; //erase sectors
> > command_iap[1]=EE_SEC_L;
> > command_iap[2]=EE_SEC_H;
> > command_iap[3]=EE_CCLK;
> > iap_entry=(IAP) IAP_LOCATION;
> > iap_entry(command_iap,result_iap);
> >
> > command_iap[0]=53; //blankcheck sectors
> > command_iap[1]=EE_SEC_L;
> > command_iap[2]=EE_SEC_H;
> > iap_entry=(IAP) IAP_LOCATION;
> > iap_entry(command_iap,result_iap);
> >
> > MEMMAP = memmap & 0x03; // restore the memory map
> > __enable_interrupt();
> >
> >
> > Joel
> >
>
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
SPONSORED LINKS
Microprocessor Microcontrollers Pic microcontrollers 8051 microprocessor
---------------------------------
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.
---------------------------------
---------------------------------
Yahoo! DSL Something to write home about. Just $16.99/mo. or less
[Non-text portions of this message have been removed]Message
RE: [lpc2000] Re: LPC2146 IAP Erase & Write not working.
2006-01-05 by Tong Le
Attachments
- No local attachments were found for this message.