a lot of test are running and i also loocked to the Assembler source:
The Library includes:
EELIB_entry external
EELIB_getVersion external
EELIB_idleHandler external
_EEPROM_init internal only
_EEPROM_write internal only
_EEPROM_read internal only
library creation info: found in the library itself:
GCC: (GNU Tools for ARM Embedded Processors) 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 227977] A2aeabi (Cortex-M3)
The Assembler code shows that the first action is to check the function WRITE or READ to eeprom
the order of the compare i think is not so good.
most accesses in EEPROMs is to the READ function, but the first compare ist to the write function
this eats unnecessary time :-)
push {lr}
sub sp,#28
str r0,[sp,#4]
str r1,[sp,#0]
ldr r3,[sp,#4]
ldr r3,[r3,#0]
cmp r3,#61 IAP command EELIB_IAP_COMMAND_EEPROM_WRITE
beq.n entry+34
ldr r3,[sp,#4]
ldr r3,[r3,#0]
cmp r3,#62 IAP command EELIB_IAP_COMMAND_EEPROM_READ
beq.n entry+34
the EELIB_getVersion simply result a constant 3
all the range checks i have tested are well done.
The latest eeprom address in the LPC1347 is 4096-64-1= 4031 adress range 0..4031 decimal
Access greater this address results in a EELIB_IAP_STATUS_DST_ADDR_NOT_MAPPED error
// write ablock of comlete EEPROM size (4032 Bytes)
res = EE_Write(0,&value,4032); // EELIB_IAP_STATUS_CMD_SUCCESS
// try to write 4033 Bytes (one byte to much)
res = EE_Write(0,&value,4033); // EELIB_IAP_STATUS_DST_ADDR_NOT_MAPPED
// write only to the latest eeprom address one byte
res = EE_Write(4031,&value,1); // EELIB_IAP_STATUS_CMD_SUCCESS
// write to the latest eeprom address 2 Bytes: (one byte above)
res = EE_Write(4031,&value,2); // EELIB_IAP_STATUS_DST_ADDR_NOT_MAPPED
// write to an eeprom address outside the address range */
res = EE_Write(4050,&value,1); // EELIB_IAP_STATUS_DST_ADDR_NOT_MAPPED
the eeprom write code i have stepped one by one the complete code and there is nothing
which change any interrupts to slow down the CPU.
the hook function is also tested. In the dead time while eeprom is written, it calls the
void EELIB_idleHandler (void)
i am on the best way to validate the library :-)
Siro