This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[FAQ] SK-AM64B: Incorrect auto-generated MAC port 2 PHY configuration

Part Number: SK-AM64B
Other Parts Discussed in Thread: DP83869, SYSCONFIG

Tool/software:

The two Ethernet Ports on SK-AM64x are connected to two separate Gigabit Ethernet PHY Transceivers DP83867.

On enabling MAC Port 2 in SK-AM64x networking examples, the auto-generated ti_board_config.c file contains Port 2 board configuration of AM64x-evm (DP83869 extended configuration) which is incorrect. 

    {    /* "CPSW3G" */
        .enetType = ENET_CPSW_3G,
        .instId   = 0U,
        .macPort  = ENET_MAC_PORT_2,
        .mii      = { ENET_MAC_LAYER_GMII, ENET_MAC_SUBLAYER_REDUCED },
        .phyCfg   =
        {
            .phyAddr         = 3,
            .isStrapped      = false,
            .skipExtendedCfg = false,
            .extendedCfg     = &gEnetCpbBoard_dp83869PhyCfg,
            .extendedCfgSize = sizeof(gEnetCpbBoard_dp83869PhyCfg),
        },
        .flags    = 0U,
    },

Any changes to the auto-generated file gets overwritten on rebuilding the example, how to fix this in a clean way?

  • SDK version 10.01 and onward

    Modify the default MAC port 2 sysconfig settings with the below PHY options:

    - Select DP83867 device from the "ETHPHY Device" drop-down.

    - Set the "Phy Address" value to 1.

    This will update the auto-generated ti_board_config.c file with the correct values.

  • SDK version 10.0 or before

    Follow the steps below to use your custom board config file instead of the auto-generated ti_board_config file:

    1. Enable "Custom Board" (CPSW/ICSSG -> Board Config -> Custom Board) option in Sysconfig GUI. This will enable the example specific enet_custom_board_config.c file. 

    2. Add enet_custom_board_config.c file  (mcu_plus_sdk_am64x\examples\networking\enet_layer2_multi_channel\am64x-evm\r5fss0-0_freertos\enet_custom_board_config.c) along with the example main.c file in CCS.

    2. In enet_custom_board_config.c file, modify the Ethernet port configuration gEnetCpbBoard_am64x_evm_EthPort with DP83867 extended config instead of DP83869 and set the phyAddr to 1 as below.

    3. Save the file and re-build the example.

    Regards,

    Nitika

  • SDK version 10.0 or before: Modifying the Sysconfig template files (not recommended)

    Another method to modify the auto-generated file is to change the template itself.

    1. Go to mcu_plus_sdk_am64x\source\sysconfig\networking\.meta\enet_cpsw\templates\am64x_am243x\enet_board_cfg.c.xdt file.

    2. Modify the am64x-evm entry of enetBoardPhyInfoMap to assign 'gEnetCpbBoard_dp83867PhyCfg' to ENET_MAC_PORT_2 as below.

        const enetBoardPhyInfoMap = new Map(
            [
                ['am64x-evm',{ENET_MAC_PORT_1: 'gEnetCpbBoard_dp83867PhyCfg', ENET_MAC_PORT_2: 'gEnetCpbBoard_dp83867PhyCfg'}],
                ['am243x-evm',{ENET_MAC_PORT_1: 'gEnetCpbBoard_dp83867PhyCfg', ENET_MAC_PORT_2: 'gEnetCpbBoard_dp83869PhyCfg'}],
                ['am243x-lp',{ENET_MAC_PORT_1: 'gEnetCpbBoard_dp83869PhyCfg', ENET_MAC_PORT_2: 'gEnetCpbBoard_dp83869PhyCfg'}],
            ],
            );

    NOTE: This will modify all the auto-generated ti_board_config files of SK-AM64x and AM64x-EVM, this can lead to failures in AM64x-EVM examples.

    Be cautious while modifying the template files,

    3. Open the sysconfig for your example and you will see the modified values in the ti_board_config.c file. Re-build the example.

    Regards,

    Nitika