cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L031 UID

NextUser
Associate

Hello,
I read the UID from STM32L031K6P6 and each device returns the same result: 0x14473332, 0x38363437, 0x0.
I read the value from the address given in RM0377 (0x1FF8 0050).
Is the address given in RM0377 correct?


I am attaching screen shots from CubeProgrammer.

1 ACCEPTED SOLUTION

Accepted Solutions
STOne-32
ST Employee

Dear @NextUser ,

The address given in RM0377 for the UID of STM32L0 devices (0x1FF80050) is correct.

However, See : UID[95:64]) it is at 0x14 offset and not at 0x8

Ensure that the offset for the third word is set to 0x14 when reading the UID, in your device 1 

Highlighted   in green below :

L0_UID_D1.png

Hope it helps you.

STOne-32

View solution in original post

2 REPLIES 2
Javier1
Principal

Checking the RM0367 page 970.

it is indeed 0x1FF8 0050.

have you tried HAL:

uint32_t uid[3];
uid[0] = HAL_GetUIDw0();
uid[1] = HAL_GetUIDw1();
uid[2] = HAL_GetUIDw2();

maybe the issue is in the way you handle pointers in your code

I just saw your attached images (cubeProgrammer), what if your issue is something as basic as connecting two times the same board, or getting confused with USB cables

this is what happens if i read the uid of two different stm32g474 i have in my table right now

Javier1_0-1749730564010.png

Javier1_1-1749730572160.png

source RM0440

Javier1_2-1749730617084.png

 

 

 

hit me up in https://www.linkedin.com/in/javiermu%C3%B1oz/
STOne-32
ST Employee

Dear @NextUser ,

The address given in RM0377 for the UID of STM32L0 devices (0x1FF80050) is correct.

However, See : UID[95:64]) it is at 0x14 offset and not at 0x8

Ensure that the offset for the third word is set to 0x14 when reading the UID, in your device 1 

Highlighted   in green below :

L0_UID_D1.png

Hope it helps you.

STOne-32