Skip to main content
sbate.1
Associate
August 2, 2024
Question

Set Static MAC address on STM32MP157 using OTP fuses

  • August 2, 2024
  • 1 reply
  • 1079 views

Hello,

I am trying to set a static MAC address on an STM32MP157 board via U-boot, I have been following this guide.
https://wiki.st.com/stm32mpu/wiki/How_to_update_OTP_with_U-Boot#:~:text=The%20fuse%20command%20allows%20you,(for%20a%20temporary%20update)

It seemed to work as the ethaddr has been set as seen in image1, however when I boot the board and check ifconfig the MAC address is not present and the board is still using a different MAC address on each boot.

Does anyone have any thoughts or ideas on what to do?

Regards

Stephen

1 reply

Erwan SZYMANSKI
Technical Moderator
August 12, 2024

Hello @sbate.1 ,
Please can you first try to erase all your non volatile environment variable with a such command in U-boot : 

U-boot $> env default -a
U-boot $> env save
U-boot $> reset

According to Linux kernel driver code, a random MAC address is created when Linux fails to get a valid Ethernet MAC address (stmmac_main.c)

Kind regards,
Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.