2017-07-10 11:10 PM
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-idSolved! Go to Solution.
2017-07-11 05:21 AM
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);2017-07-11 01:24 AM
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.
2017-07-11 03:31 AM
please tell me how to get or read this
unique ID?
im using keil
maybe just tell me which register from where
2017-07-11 04:57 AM
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
2017-07-11 05:21 AM
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);