37. Device electronic signature
The device electronic signature is stored in the system memory area of the flash memory module and can be read using the debug interface or by the CPU.
It contains factory-programmed identification and calibration data that allow the user firmware or other external devices to automatically match the characteristics of the microcontroller.
37.1 Device electronic signature registers
37.1.1 Unique device ID register (UID)
The 96-bit unique device identifier is ideally suited:
- • for use as serial number (USB string serial number or other end applications)
- • for use as part of the security keys to increase the code security in the flash memory while using and combining this unique ID with software cryptographic primitives and protocols before programming the memory
- • during processes such as secure boot
This unique device identifier provides a reference number, unique for a given device and in any context. These bits cannot be altered by the user.
Base address: 0x1FFF 7590
Address offset: 0x00
Reset value: 0xXXXX XXXX
Note: X is factory-programmed.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| UID[31:16] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| UID[15:0] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
Bits 31:0 UID[31:0] : X and Y coordinates on the wafer expressed in BCD format
Address offset: 0x04
Reset value: 0xXXXX XXXX
Note: X is factory-programmed.

| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| UID[63:48] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| UID[47:32] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
Bits 31:8 UID[63:40] : LOT_NUM[23:0], lot number (ASCII encoded)
Bits 7:0 UID[39:32] : WAF_NUM[7:0], wafer number (8-bit unsigned number)
Address offset: 0x08
Reset value: 0xXXXX XXXX
Note: X is factory-programmed.

| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| UID[95:80] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| UID[79:64] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
Bits 31:0 UID[95:64] : LOT_NUM[55:24], lot number (ASCII encoded)
37.1.2 FLASH size data register (FLASHSIZE)
Base address: 0x1FFF 75E0
Address offset: 0x00
Reset value: 0xXXXX
Note: X is factory-programmed.

| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| FLASH_SIZE[15:0] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
Bits 15:0 FLASH_SIZE[15:0] : Flash memory size
These bits indicates the size of the device flash memory in Kbytes.
As an example, 0x0040 corresponds to 64 Kbytes.
37.1.3 Package data register (PKG)
Base address: 0x1FFF 7500
Address offset: 0x00
Reset value: 0xFFXX
Note: X is either factory- or user-programmed.
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | PKG[4:0] | ||||
| r | r | r | r | r | |||||||||||
Bits 15:5 Reserved, must be kept at reset value.
Bits 4:0 PKG[4:0] : package type
00000: UFBGA73
00010: WLCSP59
01010: UFQFPN48
Others: reserved
37.1.4 IEEE 64-bit unique device ID register (UID64)
A 64-bit unique device identification (UID64) is stored in the flash memory and can be accessed by the CPUs.
Base address: 0x1FFF 7580
Address offset: 0x00
Reset value: 0xFFFF XXXX
Note: X is factory-programmed.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| DEVNUM[31:16] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| DEVNUM[15:0] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
Bits 31:0 DEVNUM[31:0] : device number
The 32-bit unique device number is a sequential number, different for each individual device.
Address offset: 0x04
Reset value: 0x0080 E115

| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| STID[23:8] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| STID[7:0] | DEVID[7:0] | ||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
Bits 31:8
STID[23:0]
: company ID
0x0080E1 for STMicroelectronics
Bits 7:0
DEVID[7:0]
: device ID
0x15