MAC Configuration STM32F4-Discovery board
I am using STM32CubeIDE to generate the code.
The only MAC address that will work is 02:00:00:00:01. This address shows up in
the LWIP\Target\ethernetif.c file in the static (void low_level_init(struct netif *netif) function. If I change it to anything else, the board no longer responds to ping.
In the /* USER CODE BEGIN MACADDRESS */ section I tried assigning another MAC address to the board but the board then doesn't respond to ping. If I assign the MAC address as 02:00:00:00:00:01 in this section it does respond to ping.
There is another reference to MAC addresses at Section 1: Ethernet peripheral configuration in the stm32fxx_hal_conf.h file. This is what displays:
#define MAC_ADDR0 2U
#define MAC_ADDR1 0U
#define MAC_ADDR2 0U
#define MAC_ADDR3 0U
#define MAC_ADDR4 0U
#define MAC_ADDR5 1U
However, I can change the #define statements to anything and is has no affect, the system still answers pings.
Exactly how do you set the MAC address for the board? Since the STM32 doesn't have a unique MAC address I will use a Microchip 11AA02E48 to obtain an address.