How to change ethernet phy address in Mbed for NXP i.MX RT1050 EVKB eval board?

I’m doing prototype work on an NXP i.MX RT1050 EVKB board. Our custom board will be slightly different in that the ethernet Phy address of enet port 0 will be 0x00 instead of 0x02.

Our electrical engineer just told me about this change and I believe it has to do with this portion of the schematic.

Where in the mbed OS source tree do I change the ethernet phy addr from 0x02 to 0x00?

I’ve looked through the various NXP EVK target sources and drivers and I just can’t determine how to do this.

Any help would be greatly appreciated.

Hello Jim,

The Ethernet Phy address seems to be defined in the mbed-os/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT1050/TARGET_EVK/device.h file as follows:

#define BOARD_ENET_PHY_ADDR    (2)

This macro is then used in the file mbed-os/connectivity/drivers/emac/TARGET_NXP_EMAC/TARGET_IMX/imx_emac.cpp as follows:

...
void Kinetis_EMAC::phy_task()
{
    uint32_t phyAddr = BOARD_ENET_PHY_ADDR;
...

You can modify the BOARD_ENET_PHY_ADDR macro to:

#define BOARD_ENET_PHY_ADDR    (0)

either in the device.h when you define your custom target or directly in the mbed-os if you don’t plan to define a custom target.

Thanks again my friend! I was looking in all the wrong places.