I'm trying to read the Unique ID of a LPC804 but, I think it was working before, now I cannot access the UID any longer.
The following function makes the whole process stop and not continue. In the debugger I find that IAP_ReadUniqueID is executed (although maybe not with success?) but a breakpoint on the status check is never reached.
uint32_t UIDValue = 0x00;
status_t UIDStatus = kStatus_Fail;
// Read the UID
UIDStatus = IAP_ReadUniqueID(&UIDValue);
// Return when failed
if(UIDStatus != kStatus_Success) return;
// insert UID into message
data[3] = (uint8_t)((UIDValue >> (8 * 3)) & 0xFF);
data[4] = (uint8_t)((UIDValue >> (8 * 2)) & 0xFF);
data[5] = (uint8_t)((UIDValue >> (8 * 1)) & 0xFF);
data[6] = (uint8_t)(UIDValue & 0xFF);
Since I think it was working prior, might the flash memory have been emptied or reset? What could it be or what can I check?