The user manual says this:
Return Code | CMD_SUCCESS followed by four 32-bit words of a unique serial number in ASCII format. The word sent at the lowest address is sent first |
But the code in the LPC5411x package is this:
/* Read the unique ID */
uint32_t Chip_IAP_ReadUID(void)
{
uint32_t command[5], result[4];
command[0] = IAP_READ_UID_CMD;
iap_entry(command, result);
return result[1];
}
I'm not sure is that's just buggy code that just keeps floating around, but it clearly won't work. Digging around in the forums I see that this exist in several LPCOpen packages.
Solved! Go to Solution.
Hi Chris,
This is not the code problem, it is the same as the ISP UID read problem.
This is a known issue and documented in the LPC5411x Errata sheet.
The workaround documented in the Errata sheet:-
The unique serial number (four 32-bit words) can be directly read from address locations
0x0100 0100 to 0x0100 010C
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Chris,
This is not the code problem, it is the same as the ISP UID read problem.
This is a known issue and documented in the LPC5411x Errata sheet.
The workaround documented in the Errata sheet:-
The unique serial number (four 32-bit words) can be directly read from address locations
0x0100 0100 to 0x0100 010C
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I'd appreciate if anyone could tell me how to actually read the UID from the part.
I tried to look at the result register (uint32_t [4]) and got:
0x0
0xFFFF
0x0
0x0