Content originally posted in LPCWare by Dino on Fri Aug 31 01:50:40 MST 2012
I made some more tests and I found that writing in the eeprom generates the problem. I read the AN11073 and made the same functions but sometime the program stop to works when writing data to eeprom. I'm using only the first 16 bytes
This is the function
void writeEEPROM(uint8_t * eeAddress, uint8_t * buffAddressWrite, uint32_t byteCount) {
unsigned int command[5], result[4];
command[0] = 61;
command[1] = (uint32_t) eeAddress;
command[2] = (uint32_t) buffAddressWrite;
command[3] = byteCount;
command[4] = SystemCoreClock / 1000;
/* Invoke IAP call...*/
iap_entry(command, result);
if (0 != result[0]) {
//Trap error
while (1)
;
}
return;
}
this is an example of the data
command[0] 61
command[1] 0
command[2] 0x10000040
command[3] 4
command[4] 48000