Skip to main content
rnaegeli
Visitor II
April 27, 2016
Question

STM32F303CB Unique Device ID - false values?

  • April 27, 2016
  • 4 replies
  • 2035 views
Posted on April 27, 2016 at 15:48

Hi

I am reading from different STM32F303CB the unique device IDs as follows:

// unique device ID base address from RM p.1120 
 #define BASE_ADDR_UID ((uint32_t *)0x1FFFF7AC) 
uint32_t UID_Low = BASE_ADDR_UID[0]; 
uint32_t UID_Mid = BASE_ADDR_UID[1]; 
uint32_t UID_High = BASE_ADDR_UID[2]; 

I got following values:

UID_High

UID_Mid

UID_Low

uC 1

20 34 36 34

57 32 57 07

0025 0023

uC 2

20 34 36 34

57 32 57 07

001F 002F

uC 3

20 34 36 34

57 32 57 04

0022 0036

uC 4

20 36 35 32

50 33 57 11

003F 0026

There is a description in the reference manual, what these values mean:

http://www2.st.com/content/ccc/resource/technical/document/reference_manual/4a/19/6e/18/9d/92/43/32/DM000435pdf/files/DM000435pdf/jcr:content/translations/en.DM000435pdf

UID [31:0]: X/Y coordinates on Wafer (BCD coded) UID [39:32]: Wafer number (8-bit unsigned number) UID [95:40]: LOT number (ASCII encoded) Problem: In my UID_Low shall be the X/Ycoordinates coded inBCD. But 0xF in BCD does not exist. In addition, the highest byte of the LOT number is a space (0x20). Is the reference manual information false or am I doing/understanding something wrong? I hope you can help me. Thank you and best regards #unique-device-id-96bit-uid-stm32
    This topic has been closed for replies.

    4 replies

    troy1818
    Associate III
    April 29, 2016
    Posted on April 29, 2016 at 09:09

    BCD is just stupid, that it is used today is even more stupid.

    But of course, you are right, there is no 0xF in BCD since it would defeat the whole purpose with the encoding. If you get these values as you say, then:

    1. Typo in reference manual

    2. Error when reading flash (wrong number of wait states configured?)

    3. Error/corrupted flash

    4. ST used some other strange BCD format which nobody heard of.

    Regards,

    Rygelxvi

    re.wolff9
    Senior
    April 30, 2016
    Posted on April 30, 2016 at 11:36

    It is a ''typo'' in the manual. They mean something completely different. It is a sign-magnitude number. If the highest bit is set, the rest is a number in the 0-50 range indicating the magnitude of the negative number. 

    So 0x800a is -10. 

    Like you my first ten chips did not have negative numbers.... 

    Your lot is something like 'W2W 464' You should read them as ASCII, although you somehow have a non-ascii character in there.... 

    RAynk
    Visitor II
    July 8, 2023

    Hoping this will be helpful for anyone looking for answers:

    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)

    rm0351-stm32l47xxx-stm32l48xxx-stm32l49xxx-and-stm32l4axxx 

    https://www.st.com/content/ccc/resource/training/technical/product_training/b7/03/bd/99/54/55/4d/47/STM32L4_System_eSign.pdf/files/STM32L4_System_eSign.pdf/jcr:content/translations/en.STM32L4_System_eSign.pdf 

    RAynk
    Visitor II
    July 8, 2023

    here is a simple gist for formatting serial no

    https://gist.github.com/aynka/c512be08a3ca3613855f88cc985addc1