EmbeddedRelated.com
Forums

Flash Memory read/write LPC2119

Started by Kemal Onyurt March 14, 2010
Hi All,

which is the easiest and fastest way store datas on chip flash and want to use in different times ?

Hope there must be more people working on sunday.

take care
Kemal

An Engineer's Guide to the LPC2100 Series

Kemal,

What are you trying to store. You have to be a bit more specific. And there
are no easy ways....:-)

On Sun, Mar 14, 2010 at 3:30 PM, Kemal Onyurt wrote:

> Hi All,
>
> which is the easiest and fastest way store datas on chip flash and want to
> use in different times ?
>
> Hope there must be more people working on sunday.
>
> take care
> Kemal
>
>
>

--
With Regards,
Nishant Agrawal
Hi Nishant,

I m datas from pc via serial port and storing them in an array(aprox size 10K) instead loading each time from pc I want to store some of those array in flash memory and will let user select which array must be loaded.
#define MaxCount 1500

typedef struct TFreqs
{
int PulseCount;
unsigned char Freq;//1,0 1,2 1,4 ..... 5
}TFreqs;
TFreqs CurFreqs[MaxCount];

CurFreqID=0;
CurFreqs<- datas from pc
Flash Memory <- CurFreqs with CurFreqID

CurFreqID++;
CurFreqs<- datas from pc
Flash Memory <- CurFreqs with CurFreqID
.
.
.
.
.
if user want , user can be able to load selected Freqs
CurFreqs <- Flash Memory FreqId

thats what I want to do

thanks

----- Original Message -----
From: Nishant Agrawal
To: l...
Sent: Sunday, March 14, 2010 4:13 PM
Subject: Re: [lpc2000] Flash Memory read/write LPC2119

Kemal,

What are you trying to store. You have to be a bit more specific. And there are no easy ways....:-)
On Sun, Mar 14, 2010 at 3:30 PM, Kemal Onyurt wrote:

Hi All,

which is the easiest and fastest way store datas on chip flash and want to use in different times ?

Hope there must be more people working on sunday.

take care
Kemal

--
With Regards,
Nishant Agrawal
Hello Kemal,

> which is the easiest and fastest way store datas on chip flash and
> want to use in different times ?

easy way could be (via const global variable)

static const unsigned char test[4] = { 0x00, 0x11, 0x22, 0x33 };

Usage (as often as you want, but only reading):

printf("%02x %02x %02x %02x\n", test[0], test[1], test[2], test[3]);

Is this what you want ?

Regards,

Martin

Hi Martin,

I want to load that array from a PC via serial port

----- Original Message -----
From: capiman26061973
To: l...
Sent: Sunday, March 14, 2010 4:33 PM
Subject: [lpc2000] Re: Flash Memory read/write LPC2119

Hello Kemal,

> which is the easiest and fastest way store datas on chip flash and
> want to use in different times ?

easy way could be (via const global variable)

static const unsigned char test[4] = { 0x00, 0x11, 0x22, 0x33 };

Usage (as often as you want, but only reading):

printf("%02x %02x %02x %02x\n", test[0], test[1], test[2], test[3]);

Is this what you want ?

Regards,

Martin
here is what I did

command[0] = 50; //Prepare sector five for a write operayion
command[1] = 5;
command[2] = 6;
iap_entry(command,result);

command[0] = 51; //write 512 bytes from address 0x40000100
command[1] = 0x0000A000; //to 0x0000A000 in flash memory sector 5 not sure about this line
command[2] = (unsigned int)inPack;
command[3] = 512;
command[4] = 19660; //my XTAL freq Khz which is writen LPC2000 flash utility
iap_entry(command,result);
return result[0];

afraid to run :) actually

waiting for help from sunday worker friends
----- Original Message -----
From: Kemal Onyurt
To: l...
Sent: Sunday, March 14, 2010 4:39 PM
Subject: Re: [lpc2000] Flash Memory read/write LPC2119

Hi Nishant,

I m datas from pc via serial port and storing them in an array(aprox size 10K) instead loading each time from pc I want to store some of those array in flash memory and will let user select which array must be loaded.
#define MaxCount 1500

typedef struct TFreqs
{
int PulseCount;
unsigned char Freq;//1,0 1,2 1,4 ..... 5
}TFreqs;
TFreqs CurFreqs[MaxCount];

CurFreqID=0;
CurFreqs<- datas from pc
Flash Memory <- CurFreqs with CurFreqID

CurFreqID++;
CurFreqs<- datas from pc
Flash Memory <- CurFreqs with CurFreqID
.
.
.
.
.
if user want , user can be able to load selected Freqs
CurFreqs <- Flash Memory FreqId

thats what I want to do

thanks

----- Original Message -----
From: Nishant Agrawal
To: l...
Sent: Sunday, March 14, 2010 4:13 PM
Subject: Re: [lpc2000] Flash Memory read/write LPC2119

Kemal,

What are you trying to store. You have to be a bit more specific. And there are no easy ways....:-)
On Sun, Mar 14, 2010 at 3:30 PM, Kemal Onyurt wrote:

Hi All,

which is the easiest and fastest way store datas on chip flash and want to use in different times ?

Hope there must be more people working on sunday.

take care
Kemal

--
With Regards,
Nishant Agrawal