i have network of rs485 and i want uniq identifier on stm32f0 . does this mcu have something like this?
if not what u recommend?
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);
Hi navid ansari,
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.
please tell me how to get or read this unique ID?
im using keil
maybe just tell me which register from where
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
Retrieving data ...