EEPROM error LPC1347

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

EEPROM error LPC1347

850 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jbelectronics on Mon Feb 24 07:40:26 MST 2014
Hi!

I am works in a project with USB and store values in the EEPROM.
The USB works fine, but when a try to write in the EEPROM the IAP error is 0x0e.

FLASH_EEPROM_WRITE = 61,/*!< EEPROM Write */

wCommand.cmd = FLASH_EEPROM_WRITE;
wCommand.eepromAddr = EEPROM_ADDR + Address_EEPROM;
wCommand.ramAddr = (uint32_t) ptr;
wCommand.byteNum = 1;
wCommand.cclk = Chip_Clock_GetSystemClockRate() / 1000;
Chip_EEPROM_Write(&wCommand, &wOutput);

Any comments or suggestions are welcome

Best regards
Labels (1)
0 Kudos
4 Replies

768 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jbelectronics on Wed Mar 12 05:35:39 MST 2014
Dear Chris,

How are you?

Finished!

//Return Code CMD_SUCCESS | SRC_ADDR_NOT_MAPPED | DST_ADDR_NOT_MAPPED
void WriteEEPROM( uint8_t* eeAddress, uint8_t* buffAddress, uint32_t byteCount )
{
unsigned int command[5], result[4];

command[0] = 61;                 
command[1] = (uint32_t) eeAddress;
command[2] = (uint32_t) buffAddress;
command[3] = byteCount;           
command[4] = SystemCoreClock/1000;

/* Invoke IAP call...*/
iap_entry(command, result);
if (0 != result[0])
{
//Trap error
while(1);
}
return;
}


//Return Code CMD_SUCCESS | SRC_ADDR_NOT_MAPPED | DST_ADDR_NOT_MAPPED
void ReadEEPROM( uint8_t* eeAddress, uint8_t* buffAddress, uint32_t byteCount )
{
unsigned int command[5], result[4];

command[0] = 62;                 
command[1] = (uint32_t) eeAddress;
command[2] = (uint32_t) buffAddress;
command[3] = byteCount;           
command[4] = SystemCoreClock/1000;

/* Invoke IAP call...*/
  iap_entry( command, result);
if (0 != result[0])
{
//Trap error
while(1);
}
return;
}

Thanks for your help

Best regards,
0 Kudos

768 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cfb on Tue Mar 11 14:11:36 MST 2014
If you are certain that eepromAddr is now being set OK but you are still getting the 'address not mapped' error that would lead me to believe that ramAddr has an invalid value.

What is the actual value of (uint32_t) ptr?

Chris
0 Kudos

768 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jbelectronics on Tue Mar 11 05:08:21 MST 2014
Thank you for your answer, But the problem persist. Error code 0x0E appear...
Any tips?

Thank you!

Jorge
0 Kudos

768 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cfb on Tue Feb 25 05:54:52 MST 2014
wCommand.eepromAddr = EEPROM_ADDR + Address_EEPROM;

Doesn't look right and 0x0e is an 'address not mapped' error. The destination address is a simple zero-based value.

Try

wCommand.eepromAddr = 0;
0 Kudos