Hello,
I am trying to retrieve the UUID from my LPC54113 using the IAP commands. I followed the instructions on the chip manual.
The problem is that the return value is always 0000FFFF 00000000 00000000 00000000 , and I'am pretty sure that this isn't right. This seems to occur only whith the read UUID command, as other commands (i.e Read Part Identification) return correct values.
The code I use for reading the UUID is:
/***************************************/
#define IAP_LOCATION 0x03000205
unsigned command_param[5];
uint32_t status_result[5];
typedef void (*IAP)(unsigned int [],unsigned int[]);
IAP iap_entry = (IAP) IAP_LOCATION;
void read_serial_number(uint32_t *ptr) //read serial via IAP
{
command_param[0] = 58; //IAP command
__disable_irq();
iap_entry(command_param,status_result);
__enable_irq();
if(status_result[0] == 0) //return: CODE SUCCESS
{
ptr[0] = status_result[1];
ptr[1] = status_result[2];
ptr[2] = status_result[3];
ptr[3] = status_result[4];
}
}
/***************************************/
To read the UUID, just call "read_serial_number" passing the pointer to save the data as argument.
Does anyone knows what am I doing wrong or if is there any other way to do this?