6 years, 7 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

6 years, 5 months 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

Accepted Answer

Thank you Jerome, very useful information! Regards, Daniel

posted by Daniel Klioc 14 Nov 2017
6 years, 7 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.

Thank you for your answer. Do you know how STM decide what ID assign to processor? Is it based on position of chip on STM manufacturing line or waffle ?

posted by Daniel Klioc 27 Sep 2017

No, I don't know. I would be interested in hearing the answer if you do find out though!

posted by Jan Jongboom 27 Sep 2017