2023-02-28 05:03 PM
dear ST / reader,
our application uses the STM32H743. We need a unique serial number to be stored in this micro, in non-volatile memory, to uniquely identify each board. There’s no on-board EEPROM, so we were wondering if this device includes any internal unique number of its own that can be accessed and which could then be used for this purpose when we found the following …
The “Unique device ID register (96 bits)�? which is “unique for any device and in any context�?. Does this mean the value will be different in each and every STM32H743, or all STM32H743s have the same number ?
What is the procedure to read this value, please ?
2023-02-28 06:12 PM
Each IC has a different number, composed of lot, wafer, die, etc
It's a constant in addressable memory, you can read it like any other memory, you can use a pointer, or library abstractions.
/**
* @brief Return the first word of the unique device identifier (UID based on 96 bits)
* @retval Device identifier
*/
uint32_t HAL_GetUIDw0(void)
{
return(READ_REG(*((uint32_t *)UID_BASE)));
}
/**
* @brief Return the second word of the unique device identifier (UID based on 96 bits)
* @retval Device identifier
*/
uint32_t HAL_GetUIDw1(void)
{
return(READ_REG(*((uint32_t *)(UID_BASE + 4U))));
}
/**
* @brief Return the third word of the unique device identifier (UID based on 96 bits)
* @retval Device identifier
*/
uint32_t HAL_GetUIDw2(void)
{
return(READ_REG(*((uint32_t *)(UID_BASE + 8U))));
}
2024-03-08 08:56 AM
Is there a scheme for the UI number? I understand that there are three 32 bit values that make up the ID number but is there somewhere that explains what bits equal what?
You mention that the number includes values for " lot, wafer, die, etc.". Is there a description somewhere?
We're using the STM32H7A3RIT6 chip.We'd like to use the UI number for the product's serial number but we can't use 96 bits since it will be displayed on the screen and probably printed on the back label.
Thanks,
Richard
2024-03-08 09:19 AM
See Section 61.1 in the reference manual
2024-03-08 09:27 AM
I did look at that section in the manual but it doesn't tell me which byte equals what type. For example which number is the lot, wafer, or die number?
We can't use the entire 96bit value. I'm asking if the first 32bits might be more variable than the 3rd 32bits. Or is the 3rd number better than the second?
2024-03-08 09:41 AM
Seem to recall an App Note, or Knowledge Base on the forum
@STOne-32 @STTwo-32 any H7 materials?
https://www.st.com/resource/en/product_training/STM32L4_System_eSign.pdf
UID[31:0]: X and Y coordinates on the wafer
UID[63:40]: LOT_NUM[23:0] Lot number (ASCII encoded)
UID[39:32]: WAF_NUM[7:0] Wafer number (8-bit unsigned number)
UID[95:64]: LOT_NUM[55:24] Lot number (ASCII encoded)
2024-03-08 09:44 AM
Check if there is sufficient OTP to implement your own
2024-03-08 09:44 AM
Hello @RCooke88 ,
Are you looking for the information like provided in RM0433 page 3290?
If yes, could you please open a new thread for that specific question? You can tag me in the new thread, so I will check internally this information ..
2024-03-08 09:58 AM
This information is available in the STM32H743 RM not in H7A/B RM. Not sure if all products have the same register field structure.
2024-03-08 11:29 AM
The new thread is here. I tagged you into it