IAP Write/Read

OP #1173151
Hi,


Im tryin to record a char acess[20] array in the flash memory of my
LPC2141 processor, but i'm finding some problems. This is my firt time
programming for a chip.
This is part of my code that i followed the instructions from Keil Carm
examples. But i'm not sure if this is working cuz i don't know how to
read the memory i recorded.
Someone can help??? The full code is atacched!


Thanks in advance!


         iap_bypointer = (IAP) 0x7FFFFFF1;

  Ram_Pointer = 0x40000100;            for (index = 0; index<0x0B;
index++){
  *Ram_Pointer = acesso[index];
  Ram_Pointer++;
  }


  command[0] = 54;                    iap_bypointer(command,result);



  command[0] = 50;
  command[1] = 5;
  command[2] = 5;
  iap_bypointer(command,result);

  command[0] = 52;
  command[1] = 5;
  command[2] = 5;
  command[3] = 12000;
  iap_bypointer(command,result);

  command[0] = 50;
  command[1] = 5;
  command[2] = 5;
  iap_bypointer(command,result);

  command[0] = 51;
  command[1] = 0x0000A000;
  command[2] = 0x40000100;
  command[3] = 256;
  command[4] = 12000;
  iap_bypointer(command,result);
Attached files:

Reply

A question of your own? This thread is over 18 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.