2010-11-13 12:38 AM
Unique USB serial number for Stm32f103VB
2011-05-17 05:14 AM
In the USB demo firmware from Stmicro, I can see that the USB serial number is built from the content of the memory locations at 1FFFF7E8, 1FFFF7EC and 1FFFF7F0, at the end of the system memory. My guess is that these locations hold a serial number unique for each chip. Since this not documented, can somebody confirm it?
Like in the TRM? 29.2 Unique device ID register (96 bits) The unique device identifier is ideally suited: �? for use as serial numbers (for example USB string serial numbers or other end applications) �? for use as security keys in order to increase the security of code in Flash memory while using and combining this unique ID with software cryptographic primitives and protocols before programming the internal Flash memory �? to activate secure boot processes, etc. The 96-bit unique device identifier provides a reference number which is unique for any device and in any context. These bits can never be altered by the user. The 96-bit unique device identifier can also be read in single bytes/half-words/words in different ways and then be concatenated using a custom algorithm. Base address: 0x1FFF F7E8 Address offset: 0x00 Read only = 0xXXXX where X is factory-programmed2011-05-17 05:14 AM
Many thanks! That exactly answers my question and also solves my problem. I am not at all concerned about security, I only need different serial numbers for several devices attached to the same computer.
By the way, where did you find this information?2011-05-17 05:14 AM
STM32 Reference Manual
RM0008 http://www.st.com/stonline/products/literature/rm/13902.pdf I recall some other details of wafer lot and die position, perhaps in the flash programmer code, but I'm not sure if that is remotely useful in the general case. The 96-bit number is supposed to be ST unique, but is not really suitable for a faux MAC address.2011-05-17 05:14 AM