AnsweredAssumed Answered

IAP call crashes when trying to read UID

Question asked by Koen WW on Feb 11, 2019
Latest reply on Feb 12, 2019 by Koen WW

I am using the LPCOpen library at the moment with MCU LPCExpresso IDE for  the LPC1830 chip.

For a project I need to read the UID of the CPU. I tried it with the following functions:

But it crashes and I don't know why. Maybe someone can help me?

I increased the cpuUID size to 5, but 4 is enough.

Program counter has weird number: 0x12345678 


uint32_t cpuUID[5] = {0};

//The function call crashed on this function:

/* Read the unique ID */
uint32_t Chip_IAP_ReadUID(uint32_t uid[])
uint32_t command[5], result[5], i;

command[0] = IAP_READ_UID_CMD;
iap_entry(command, result); //IAP ENTRY CRASH

for(i = 0; i < 4; i++) {
uid[i] = result[i + 1];

return result[0];

Note in this picuture: uint32 needs to be uint32_t (line 103)

Strack trace of error