How do I read back the UID, UUID, DEVICEID, DERIVID and REVID for 8-bit MCU?
C8051F85x/C8051F86x/EFM8SB1/EFM8SB2/EF8BB1/EFM8UB2 have a 32-bit unique identifier (UID). After reset, the UID will be filled in the specific address RAM/XRAM, and you can read back the value by reading these RAM/XRAM locations. Be aware that the RAM/XRAM locations may be overwritten by startup code (these RAM locations can then be reused by the user). For more information on the XRAM or RAM locations, see the specific device data sheet or reference manual.
EFM8LB1/EFM8BB2/EFM8BB3/EFM8UB1 have a 128-bit universally unique identifier (UUID), The UUID resides in the read-only area of flash memory, which cannot be erased or written by the end application. The UUID can be read by firmware or through the debug interface at flash locations 0xFFC0-0xFFCF.
In the C8051 8-bit MCU like C8051F340, DEVICEID and DEVID could be only accessed by the C2 interface. For new EFM8 devices (except EFM8UB2 and EFM8SB2) and C8051F85x/F86x devices, there are SFR registers (DERIVID, DEVICEID and REVID), and firmware can access this same information.