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.

RTOS/AM3352: Ping fails in NIMU basic example project

Part Number: AM3352

Tool/software: TI-RTOS

Hi

     when I use the default project NIMU_BasicExample_bbbAM335x_armExampleproject for my test,

I can't ping the device successful.

Through the code, we learned that the code related to the initialization of emac has the following parts:

/* Chip configuration MII/RMII selection */
SOCCtrlCpswPortMacModeSelect(1, ETHERNET_MAC_TYPE_RMII);
SOCCtrlCpswPortMacModeSelect(0, ETHERNET_MAC_TYPE_RMII);

EMAC_socGetInitCfg(0, &cfg);
cfg.port[0].phy_addr = EMAC_CPSW_PORT0_PHY_ADDR_EVM;
cfg.port[1].phy_addr = EMAC_CPSW_PORT0_PHY_ADDR_EVM;
cfg.macModeFlags = EMAC_CPSW_CONFIG_MODEFLG_FULLDUPLEX;
EMAC_socSetInitCfg(0, &cfg);

/create app task/

NIMUDeviceTable[nimu_device_index++].init = &CpswEmacInit ;
NIMUDeviceTable[nimu_device_index].init = NULL ;

about the soc,is there any config for HW except SOCCtrlCpswPortMacModeSelect?

and I know the init and register EMAC is by CpswEmacInit .

how can I know init and register EMAC success,is there any log?

I don't know how does CpswEmacInit  function exectued.so I don't know if EMAC has init or register.

BR!

  • Hi,

    Did you use the latest Processor SDK RTOS for AM335x (5.3 release) for testing? All the software examples are verified via system test before release. So I expect the NIMU_BasicExample_bbbAM335x_armExampleproject should work as it is. Let me know if 5.3 release worked for you or not. If not, I will find a BBB to test.

    Regards, Eric
  • Hi

        my PDK version is 5.2,I have do many work for my project.so I don't want to update to 5.3,

    I think there are some errors on the EMAC configure,can you give me some suggsetion about emac

  • Hi,

    Thanks for the feedback! Even there is something wrong with the EMAC configuration, I don't expect you spend time to debug it, the TI provided test application is expected to work as it is. If not, we will debug and fix it.

    I got clarification that AM335x NIMU ping was tested on AM335x GP EVM, not the BBB. So, I am looking for BBB to test it and will update you.

    Regards, Eric
  • Thanks for the feedback!I will wait you test result.please let me know the result as you havee tested

  • Hi,

    I found a BBB board and tested, it worked for me. Attached is the binary, please try it if it worked for you. I tested "ping 192.168.1.4" with it.NIMU_BasicExample_bbbAM335x_armExampleproject.out

    Regards, Eric

  • Hi Eric

        Thank you for youre feedback,I have download you bin file to my board,the log show:

    --------------------------------------------------------------------------------------
    RX | Good: 0 | Bcast: 0 | Mcast: 0 | Oct: 0 |
    RX | Pause: 0 | CRC: 0 | AlignErr: 0 | Oversz: 0 |
    RX | Jabber: 0 | Undersz: 0 | Frag: 0 | Filt: 0 |
    RX | QoS: 0 | SOFOvr: 0 | MOFOvr: 0 | DMAOvr: 0 |
    TX | Good: 0 | Bcast: 0 | Mcast: 0 | Oct: 0 |
    TX | Pause: 0 | Deferred: 0 | Coll: 0 | Udrn: 0 |
    --------------------------------------------------------------------------------------
    ENETPHY_FindingState: Timed Out looking for a Phy!
    ENETPHY_FindingState: Timed Out looking for a Phy!
    ENETPHY_FindingState: Timed Out looking for a Phy!
    ENETPHY_FindingState: Timed Out looking for a Phy!
    --------------------------------------------------------------------------------------
    RX | Good: 0 | Bcast: 0 | Mcast: 0 | Oct: 0 |
    RX | Pause: 0 | CRC: 0 | AlignErr: 0 | Oversz: 0 |
    RX | Jabber: 0 | Undersz: 0 | Frag: 0 | Filt: 0 |
    RX | QoS: 0 | SOFOvr: 0 | MOFOvr: 0 | DMAOvr: 0 |
    TX | Good: 0 | Bcast: 0 | Mcast: 0 | Oct: 0 |
    TX | Pause: 0 | Deferred: 0 | Coll: 0 | Udrn: 0 |
    --------------------------------------------------------------------------------------
    ENETPHY_FindingState: Timed Out looking for a Phy!
    ENETPHY_FindingState: Timed Out looking for a Phy!
    ENETPHY_FindingState: Timed Out looking for a Phy!
    ENETPHY_FindingState: Timed Out looking for a Phy!

    and I still can't ping successful

  • my board has 1 poart,and the Chip configuration is MMI1,
    I have modified the pinmux_data.c that match my board.shall I modify the EMAC_soc init config?
    myy PDK version is pdk_am335x_1_0_13
  • Hi,

    What board you are using? Is it TI Beagle board black or your own board? Why you need to modify pinmux_data.c? If you modify the PINMUX, then you also need to rebuild the board library. See:
    software-dl.ti.com/.../index_board.html

    The error came from ENET_PHY_log("ENETPHY_FindingState: Timed Out looking for a Phy!\n"); You need check the enet_phy.c for your own board to see why the PHY can't be found.

    Also, if you are using MII instead of RMII, you should use:
    /* Chip configuration MII/RMII selection */
    SOCCtrlCpswPortMacModeSelect(1, ETHERNET_MAC_TYPE_MII);
    SOCCtrlCpswPortMacModeSelect(2, ETHERNET_MAC_TYPE_MII);

    Regards, Eric
  • I am using our own board,and I have checked that the pinmux is the same with Beagle board.
    I have modified :
    /* Chip configuration MII/RMII selection */
    SOCCtrlCpswPortMacModeSelect(1, ETHERNET_MAC_TYPE_MII);
    SOCCtrlCpswPortMacModeSelect(2, ETHERNET_MAC_TYPE_MII);

    but it is still unworked.
  • Thanks! Then you need to check your board why it can't find the PHY? Is this the same PHY used in TI BBB and the same circuit design?

    Regards, Eric
  • can you give me the link of TI BBB circuit design document,I will ask our HW engineer to check.

  • Hi eric

    can you give me the link of TI BBB circuit design document,I will ask our HW engineer to check.

  • Hi Eric
    I found the phy address is different to bbb board,when I modified the phy address for my board,it is worked,
    thanks!