Whenever I issue an IAP command (data in memory block, R0 points to data block, R1 points to return data block) it returns 167 cycles later with 0x01 in the memory location pointed to by R1, indicating an invalid command.
This happens whatever command number I put in the location pointed to by R0, and it is always 167 cycles.
My code was copied from the LPC Open read eeprom routine. Unfortunately, the debugger will not let me trace what happens after the call to 0x03000205. It goes to the next instruction, the contents of the location pointed to by R1 changes to 0x01, and the "delta cycle" register shows 0xA7.
Presumably, the LPCopen example does actually work, so I'm assuming that there must be some start condition that enables the IAP command which I am missing and is not shown in the manual not the comments to eeprom.c