Hi,
The revision history showed that this update has included this feature "updated Ethernet interface for reading the MAC address from the driver, if a unique MAC address is available in the driver".
Does anyone know what this means? Is there any sample code that can explain this new feature?
Thank you.
Some evaluation boards have a MAC address available in the EEPROM. The MAC address is unique and is provided by the vendor. In this case, the network library reads the MAC address from the driver and does not use the one defined in the ethernet interface configuration.
I have an evaluation board with NXP K64 MCU, and I have connected the I2C EEPROM to MCU. If I want to use this I2C EEPROM to save the MAC address. Do you mean that Keil Network component can read the MAC address from the I2C EEPROM? If so, which API or configurations that I can use in this case?
Read the EEPROM in the code, and then set up the MAC address with netIF_SetOption. The above function is usually used with external EMAC controllers, which have direct access to the EEPROM.
This is confusing me now because the previously Keil Network component can use the below routine to change the default MAC address which is defined in Net_Config_ETH_0.h.
netIF_SetOption(NET_IF_CLASS_ETH | 0, netIF_OptionMAC_Address, Mac_Addr, 6);
So what is the difference between the new Keil network components?
There is no difference and your code is correct, continue to use it.
The discussion is about an extra feature that is rarely used, for example, with LAN91C111. This ethernet controller supports "Optional Configuration via Serial EEPROM Interface" Read the LAN91C111 datasheet, section 7.6 Serial EEPROM Interface