Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

Problem with IAP

Problem with IAP

2005-03-15 by dommati sunil

Hello to all group members.
                                   This is the first time iam mailing to this group.
Iam working on LPC2214 ARM controller using GNU tools.
 I want to place some data in the flash memory.When i am entering the "iap_entry "function my debugger is hanging.Its not showing where it is going next.Its just hanging up.I am using JTAG for debugging.
              Here's is my sample code.Please kindly help in this problem.Iam really struck up at this point.
 Please tell me whether my code is correct or not?and what are the things to be added.
 
#include "lpc22xx.h"
#define IAP_LOCATION 0X7FFFFFF1
void setup(unsigned int *);
void setup(unsigned int *setup)
{
   typedef void (*IAP)(unsigned int[],unsigned int[]);
   unsigned long command[5];
   unsigned long result[2];
      IAP iap_entry;
   
     
      iap_entry=(IAP)IAP_LOCATION;
       //prepare sector
  
       command[0]=50;
       command[1]=14;
       command[2]=14;
       iap_entry(command,result);
  
 //erase
 command[0]=52;
 command[1]=14;
 command[2]=14;
 command[3]=14745;
 iap_entry(command,result);
 
 // prepare to program
    iap_entry=(IAP)IAP_LOCATION;
   command[0]=50;
   command[1]=14;
   command[2]=14;
   iap_entry(command,result);
  
  //program
  command[0]=51;
  command[1]=0x1c000; /*Destination address*/
  command[2]=(int)setup;/*Source RAM address*/
  command[3]=512; /*no of byte*/
  command[4]=14745;
  iap_entry(command,result);
 }

int main(void)
{
 unsigned int var,*p;
 p=&var;
  var=10;
 setup(&p);
}
 
 
 
      
Thanks in advance.
Sunil .
 
 

		
---------------------------------
Do you Yahoo!?
 Yahoo! Mail - You care about security. So do we.

[Non-text portions of this message have been removed]

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.