EmbeddedRelated.com
Forums

How to read from and write into lpc2103 flash memory during run time

Started by ronak bhalani June 29, 2010
Hi All,

I am using lpc2103 for my application. The application is such that some of the parameters are required to be stored into and retrieved from the flash memory during run time. So, is it possible to read from and write into the lpc2103 flash memory during run time?

Kindly provide the available solution for this issue.

Thanks.

An Engineer's Guide to the LPC2100 Series

ronak bhalani wrote:
> So, is it possible to read from and write into the lpc2103 flash memory
> during run time?

Read about IAP in the UM.

--

Timo

--- In l..., ronak bhalani wrote:
>
> I am using lpc2103 for my application. The application is such that some of the parameters are required to be stored into and retrieved from the flash memory during run time. So, is it possible to read from and write into the lpc2103 flash memory during run time?
>
> Kindly provide the available solution for this issue.
>

Download and study the NXP Application Note AN10256 "Using IAP for LPC2000 Microcontrollers"

http://www.nxp.com/documents/application_note/AN10256.pdf

Regards,
Chris Burrows
CFB Software

Astrobe: LPC2xxx Oberon-07 Development System
http://www.astrobe.com

Hi,
 
        Thanks for the solution. But is it possible to read from the flash memory during run time using IAP commands? If so then please provide the IAP commands for the same since these kind of commands are not given in manual.

--- On Wed, 30/6/10, cfbsoftware1 wrote:

From: cfbsoftware1
Subject: [lpc2000] Re: How to read from and write into lpc2103 flash memory during run time
To: l...
Date: Wednesday, 30 June, 2010, 7:47 AM

 

--- In l..., ronak bhalani wrote:

>

>       I am using lpc2103 for my application. The application is such that some of the parameters are required to be stored into and retrieved from the flash memory during run time. So, is it possible to read from and write into the lpc2103 flash memory during run time?

>

>       Kindly provide the available solution for this issue.

>

Download and study the NXP Application Note AN10256 "Using IAP for LPC2000 Microcontrollers"

http://www.nxp.com/documents/application_note/AN10256.pdf

Regards,

Chris Burrows

CFB Software

Astrobe: LPC2xxx Oberon-07 Development System

http://www.astrobe.com
Hello ronak,

Wednesday, June 30, 2010, 6:35:25 AM, you wrote:

rb> Thanks for the solution. But is it possible to read from
rb> the flash memory during run time using IAP commands? If so then
rb> please provide the IAP commands for the same since these kind of
rb> commands are not given in manual.

You don't need IAP to read flash. All flash is mapped to memory, so
just read data from the specific address you want.

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

You can read of flash using the pointer to the address requested.

Code exemple:

#define ADDR_FLASH 0x0007C000;

unsigned int *pFlash;
unsigned int flashValue;

pFlash = (unsigned int*)ADDR_FLASH;
flashValue = (*pFlash);

Regards,
Jonatan
2010/6/30 ronak bhalani

> Hi,
>
> Thanks for the solution. But is it possible to read from the flash
> memory during run time using IAP commands? If so then please provide the IAP
> commands for the same since these kind of commands are not given in manual.
>
> --- On *Wed, 30/6/10, cfbsoftware1 * wrote:
> From: cfbsoftware1
> Subject: [lpc2000] Re: How to read from and write into lpc2103 flash memory
> during run time
> To: l...
> Date: Wednesday, 30 June, 2010, 7:47 AM
>
> --- In l...,
> ronak bhalani wrote:
> >
> > I am using lpc2103 for my application. The application is such that
> some of the parameters are required to be stored into and retrieved from the
> flash memory during run time. So, is it possible to read from and write into
> the lpc2103 flash memory during run time?
> >
> > Kindly provide the available solution for this issue.
> > Download and study the NXP Application Note AN10256 "Using IAP for LPC2000
> Microcontrollers"
>
> http://www.nxp.com/documents/application_note/AN10256.pdf
>
> Regards,
> Chris Burrows
> CFB Software
>
> Astrobe: LPC2xxx Oberon-07 Development System
> http://www.astrobe.com
>
>
Like Igor and Jonatan said, reading from the Flash is as simple as reading
from a memory location. However, writing to flash is a bit complicated. If
you are looking for a simple command to write to a particular location, you
should know that that is not possible.

Read the above mentioned Application Note and also refer to this old thread
and that might give you some ideas.

http://www.embeddedrelated.com/groups/lpc2000/show/43523.php

-Ananda

On Wed, Jun 30, 2010 at 5:38 AM, Jonatan Vieira wrote:

> You can read of flash using the pointer to the address requested.
>
> Code exemple:
>
> #define ADDR_FLASH 0x0007C000;
>
> unsigned int *pFlash;
> unsigned int flashValue;
>
> pFlash = (unsigned int*)ADDR_FLASH;
> flashValue = (*pFlash);
>
> Regards,
> Jonatan
> 2010/6/30 ronak bhalani
>>
>> Hi,
>>
>> Thanks for the solution. But is it possible to read from the flash
>> memory during run time using IAP commands? If so then please provide the IAP
>> commands for the same since these kind of commands are not given in manual.
>>
>> --- On *Wed, 30/6/10, cfbsoftware1 * wrote:
>> From: cfbsoftware1
>> Subject: [lpc2000] Re: How to read from and write into lpc2103 flash
>> memory during run time
>> To: l...
>> Date: Wednesday, 30 June, 2010, 7:47 AM
>>
>> --- In l...,
>> ronak bhalani wrote:
>> >
>> > I am using lpc2103 for my application. The application is such
>> that some of the parameters are required to be stored into and retrieved
>> from the flash memory during run time. So, is it possible to read from and
>> write into the lpc2103 flash memory during run time?
>> >
>> > Kindly provide the available solution for this issue.
>> >
>>
>> Download and study the NXP Application Note AN10256 "Using IAP for LPC2000
>> Microcontrollers"
>>
>> http://www.nxp.com/documents/application_note/AN10256.pdf
>>
>> Regards,
>> Chris Burrows
>> CFB Software
>>
>> Astrobe: LPC2xxx Oberon-07 Development System
>> http://www.astrobe.com
>>
>
>