Skip to main content
navid ansari
Associate II
July 11, 2017
Solved

does stm32f0 have uniq identifire or something for finding it in RS485 network?

  • July 11, 2017
  • 1 reply
  • 977 views
Posted on July 11, 2017 at 08:10

hi

i have network of rs485 and i want uniq identifier on stm32f0 . does this mcu have something like this?

if not what u recommend?

#stm32f0 #unique-id #device-id
This topic has been closed for replies.
Best answer by john doe
Posted on July 11, 2017 at 12:21

you need to read the reference manual for your chip. this will probably work.

    uint32_t word0 = *(uint32_t *)(UID_BASE);

    uint32_t word1 = *(uint32_t *)(UID_BASE + 0x04); // offsets as per reference manual

    uint32_t word2 = *(uint32_t *)(UID_BASE + 0x08);

1 reply

Tilen MAJERLE
ST Employee
July 11, 2017
Posted on July 11, 2017 at 10:24

Hi

ansari.navid

‌,

all STM32 devices have unique ID, of 96-bits. You may use this as your device address in the network. You just must take care that if you only take single byte (ex. MSB byte) for ID for address, you may have duplicate device addresses on network.

navid ansari
Associate II
July 11, 2017
Posted on July 11, 2017 at 10:31

please tell me how to get or read this 

unique ID?

im using keil 

maybe just tell me which register from where 

navid ansari
Associate II
July 11, 2017
Posted on July 11, 2017 at 11:57

i did it like this

navid0 = *((unsigned long *)0x1FFFF7F8);

navid1 = *((unsigned long *)0x1FFFF7FC);

navid2 = *((unsigned long *)0x1FFFF800);

but the addresses is not what is in forum . 

i dont know if this id is right or not cause i found the address