AnsweredAssumed Answered

Problem with result returned from LPC804 IAP boot code version readout in SDK v2.6.0

Question asked by Robert Beekmans on Aug 15, 2019
Latest reply on Jan 10, 2020 by Robert Beekmans

Hi all,


Recently I ran into the problem the boot code version readout (by IAP on a LPC804) is not behaving as described in API documentation of LPC804 SDK v2.6.0.

In my tests run in DEBUG the second 32-bit word of the result array is always zero but in RELEASE build it gets random values. It seems the second 32-bit word is not read at all by the boot rom function to readout the boot code version.


So I searched in the user manual (UM11065) and compared source code from "older" LPC804 example code bundle v1.6 and current SDK v2.6.0 (see below).


Description of result according to UM11065 - User Manual LPC804 rev 1.3 (4.6.6 on page 37):

Description:      This command is used to read the boot code version number.

Result:              Result0: 2 bytes of boot code version number. Read as <byte1(Major)>.<byte0(Minor)>

Code snippet from LPC804 Example Code Bundle v1.6:

uint32_t ReadBootcodeVersion(void)
IAP_Call (&IAP.cmd, &IAP.stat);
printf("Boot Version is 0x%X\n\n",IAP.res[0] );
if (IAP.stat) return (0);

return (IAP.res[0]);


Code snippet from LPC804 SDK v2.6.0:

* brief Read boot code version number.

* This function is used to read the boot code version number.
* param bootCodeVersion Address to store the boot code version.
* retval #kStatus_IAP_Success Api was executed successfully.

* note Boot code version is two 32-bit words. Word 0 is the major version, word 1 is the minor version.
status_t IAP_ReadBootCodeVersion(uint32_t *bootCodeVersion)
uint32_t command[5], result[5];

command[0] = kIapCmd_IAP_Read_BootromVersion;
iap_entry(command, result);
bootCodeVersion[0] = result[1];
bootCodeVersion[1] = result[2];

return translate_iap_status(result[0]);


The result description in the user manual UM11065 seems to be inline with the implementation of LPC804 example code bundle v1.6 but the current SDK v2.6.0 is different and the API description of IAP_ReadBootCodeVersion() is not conform the user manual description.

Please explain how I should interpret the result from IAP_Read_BootromVersion.


Kind regards,