Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 2 months ago.
Are Nucleo board MAC address unique?
Hello,
I started investigation about MAC address for NUCELOF767 and found out in file:
features/FEATURE_LWIP/lwip_interface/lwip-eth/arch/TARGET_STM/stm32xx_emac.c
from line 490 what it takes 6 bytes for MAC address, 3 lowest bytes are specific ST_mac_addr and 3 highest bits are same for all F7 processors.
But Unique ID(UID) is 94 bits (12 bytes). Can this guarantee that all STM32F767 microcontrollers will have uniq MAC addresses?
In reference manual at section 45.1 it explains about UID. Reference manual: http://www.st.com/content/ccc/resource/technical/document/reference_manual/group0/96/8b/0d/ec/16/22/43/71/DM00224583/files/DM00224583.pdf/jcr:content/translations/en.DM00224583.pdf
2 Answers
7 years, 1 month ago.
Hi
Few comments:
- There is no MAC address assigned for NUCLEO or DISCO boards
- That's why we "create" one in stm32xx_emac.c depending on UID
- UID is unique and depends on the position of chip in the wafer
- Unique MAC address is not 100% guaranteed as we take only 3 bytes from UID
- We give the possibility to redefine mbed_otp_mac_address function in your application if you want to set your own MAC address implementation
Regards, Jerome
7 years, 2 months ago.
Edit; misread the question at first.
Good question... I think it's possible that collisions will occur because they're capping entropy. I'd imagine they mitigate this on their development boards, but with 3 bytes of entropy you only have 16,581,375 possibilities.
If you're shipping these chips inside products you'll probably need to buy your own IEEE MAC address range to guarantee uniqueness.