lpcware

IAP on LPC1769

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by masterboy on Tue Mar 19 06:09:18 MST 2013
Hi,

I try IAP on LPC1769. I would like to use last 4 sectors (26, 27, 28, 29) to store data. I have this simple examle:

#ifdef __USE_CMSIS
#include "LPC17xx.h"
#endif

#include <cr_section_macros.h>
#include <NXP/crp.h>

__CRP const unsigned int CRP_WORD = CRP_NO_CRP ;

#define IAP_LOCATION 0x1FFF1FF1

unsigned int command[5];
unsigned int result[5];

typedef void (*IAP)(unsigned int [],unsigned int[]);
IAP iap_entry;

int main(void) {

SystemCoreClockUpdate();

command[0] = 50;
command[1] = 26;
command[2] = 26;
iap_entry (command,result);

while(1) {

}
return 0 ;
}


I upload this code to LPC, but after start code stopped on HardFault_Handler. What does it mean? What do I do wrong?

Outcomes