6 years, 4 months ago.

Change MAC Address on NUCLEO-F767ZI

Hello I am making a program using EthernetInterface on NUCLEO-F767ZI. I would like to use multiple NUCLEO on the same network , but the program doesn't work because the MAC address is duplicated.

Do you know the way to change the MAC address?

Question relating to:

STM32 Nucleo-144 development board with STM32F767ZIT6 MCU, supports Arduino, ST Zio and morpho connectivity

Check this question for a possible answer.

https://os.mbed.com/questions/79115/Are-Nucleo-board-MAC-address-unique/

Dave.

posted by David Fletcher 10 Nov 2017

2 Answers

6 years, 4 months ago.

Hi,

As said by Daniel the MAC address contains the device UID. And this UID is really unique per device. So it is very strange that you have the same MAC address on multiple device ? Can you share your program ?

Accepted Answer

The UID for the processor is something like 128bits long. And only about 24-32bits of this ID are are used in the MAC address. This means that depending on how ST Micro choose to encode the MAC ID it is not guaranteed to be unique.

posted by Daniel Klioc 10 Nov 2017

I'm sorry, my misunderstanding. I found a mistake in my code. Thank you for answering my question.

posted by Shota Asao 11 Nov 2017
6 years, 4 months ago.

From my experience you can try to change MAC address in features/FEATURE_LWIP/lwip_interface/lwip-eth/arch/TARGET_STM/stm32xx_emac.c file. check end of file for mbed_default_mac_address. It uses 3 bytes of standard STM32F7 series ID and 3bytes from processor UID. There are more details in reference manual for STM32F767 processor on official STM site.

Second option is to get EEPROM chip with unique ID.

Let me know if it will help or need any other help. Daniel

Thank you for answering the question, Daniel. I will try changing the contents of stm32xx_emac.c.

posted by Shota Asao 11 Nov 2017