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.

PROCESSOR-SDK-AM335X: Custom board AM335x - ping fails in NIMU basic example

Part Number: PROCESSOR-SDK-AM335X
Other Parts Discussed in Thread: AM3354

Hello,
I'm working with custom board AM3354.

I'm using ccs1020 and TI-RTOS:
- bios_6_76_03_01,
- xdctools_3_55_02_22_core,
- pdk_am335x_1_0_17,
- edma3_lld_2_12_05_30E,
- ndk_3_61_01_01,
- ns_2_60_01_06,
- ti-cgt-pru_2.3.2,
- uia_2_30_01_02,
- cg_xml_2.61.00,
- processor_sdk_rtos_am335x_6_03_00_106.

I tested different examples for BBB and some of them are working fine with my custom board. For example UART one.
But now, I want to start using network, so I'm trying example as: "NIMU_BasicExample_bbbAM335x_armExampleproject".

While I'm using static ip address, ping fails. In wireshark I saw only arp request from my PC, but board didn't sent any packet.
On console I can see 0 packets in and 0 packets out.
--------------------------------------------------------------------------------------
 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 |
--------------------------------------------------------------------------------------

While I'm using dhcp, on console I can see tx packets. But, in wireshark no packets appeared.
--------------------------------------------------------------------------------------
 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:       1 |   Bcast:       1 |    Mcast:       0 |    Oct:         594 |
 TX |    Pause:       0 | Deferred:      0 |     Coll:       0 |   Udrn:           0 |
--------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------
 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:       2 |   Bcast:       2 |    Mcast:       0 |    Oct:        1188 |
 TX |    Pause:       0 | Deferred:      0 |     Coll:       0 |   Udrn:           0 |
--------------------------------------------------------------------------------------

I have checked registers and they are the same as BBB - they are AM335x boards.
In example "NIMU_BasicExample_bbbAM335x_armExampleproject" I changed one eth port to rmii mode, as I have read from my custom board device tree.

I added attachment with block diagram of my custom board with information about ethernet PHY.



Could you give me any tips what should I change to make this example work?

Sincerely,


  • Hi Kamila,

    Sorry to hear that example did not work for you.

    Did you face any issues with NIMU_BasicExample_bbbAM335x_armExampleproject on the TI bbb AM335x board?

    Sorry, I do not have bbb AM335x board with me to try out the basic example.

    What are the delta between your custom board and TI board? Is it possible for you to summarize?

    Thanks,

  • Hello,
    I didn't have TI bbb AM335x board.
    I tested NIMU_BasicExample_bbbAM335x_armExampleproject on my custom AM335x board.

    My custom board:
     - clock frequency: 800MHz;
     - ethernet: 2x 10/100 Mbit/s;
     - memory: 256 MB DDR3 RAM.
     
    TI bbb AM335x board:
     - clock frequency: 1GHz;
     - ethernet: 1x 10/100 Mbit/s;
     - memory: 512 MB DDR3 RAM.
     
    Earlier, I added picture of block diagram of my custom board, and below I attached device tree:
    mdio@4a101000 {
                    compatible = "ti,cpsw-mdio", "ti,davinci_mdio";
                    #address-cells = <0x00000001>;
                    #size-cells = <0x00000000>;
                    ti,hwmods = "davinci_mdio";
                    bus_freq = <0x000f4240>;
                    reg = <0x4a101000 0x00000100>;
                    status = "okay";
                    pinctrl-names = "default";
                    pinctrl-0 = <0x00000053>;
                    ethernet-phy@0 {
                        reg = <0x00000000>;
                        linux,phandle = <0x00000054>;
                        phandle = <0x00000054>;
                    };
                    ethernet-phy@1 {
                        reg = <0x00000001>;
                        linux,phandle = <0x00000055>;
                        phandle = <0x00000055>;
                    };
                };
                slave@4a100200 {
                    mac-address = [00 00 00 00 00 00];
                    phy-handle = <0x00000054>;
                    phy-mode = "rmii";
                    dual_emac_res_vlan = <0x00000001>;
                };
                slave@4a100300 {
                    mac-address = [00 00 00 00 00 00];
                    phy-handle = <0x00000055>;
                    phy-mode = "mii";
                    dual_emac_res_vlan = <0x00000002>;
                };
                cpsw-phy-sel@44e10650 {
                    compatible = "ti,am3352-cpsw-phy-sel";
                    reg = <0x44e10650 0x00000004>;
                    reg-names = "gmii-sel";
                    rmii-clock-ext;
                };
    As I can see: first port is working in rmii mode, second is working in mii mode.
    So I changed code to:
        SOCCtrlCpswPortMacModeSelect(1, ETHERNET_MAC_TYPE_RMII);
        SOCCtrlCpswPortMacModeSelect(2, ETHERNET_MAC_TYPE_MII);
    Both ports of TI bbb AM335x board are working with mii mode, so it is next difference.

    Additionally I changed beagleboneblack.gel file:
    - 24MHz to 25MHz, because function GetInputClockFrequency() shows this value as correct;
    - 512Mb DDR3 to 256Mb DDR3 according to my custom board documentation.
    Now, DDR tests and EDMA test passed and initialization is without errors.
    But, I'm not sure this changes are enough.

    Moreover, after adding gel file, while I'm using dhcp, I can't see any tx packets on console.
    So probably the gel file is still incorrect.

    The situation I described in my first message is without gel file and then effect was better.
    But, I still can't send/receive packets over the network.

    Sincerely,



  • Hi Kamila,

    Few pointers:

    1. Had you verified all the pinmux is correct for your custom board?

    2. Had you verified Phy initialization (setup and reset) is done correctly on your custom board and Link is up?

    3., Had you provided correct phy address for EMAC driver (please refer to EMAC_socSetInitCfg() code in the example)

    Sorry! I would not be able to support debug on your custom board.

  • Hello,
    After running program I see:
        ENETPHY_FindingState: PhyNum: 0
        ENETPHY_FindingState: PhyNum: 1
        ENETPHY_DisablePhy(0)
        Enable Phy to negotiate external connection
        NWAY Advertising: FullDuplex-1000 FullDuplex-100 HalfDuplex-100 FullDuplex-10 HalfDuplex-10
        ENETPHY_DisablePhy(1)
        Enable Phy to negotiate external connection
        NWAY Advertising: FullDuplex-1000 FullDuplex-100 HalfDuplex-100 FullDuplex-10 HalfDuplex-10
        Phy: 0, NegMode 01e1, NWAYadvertise 01e1, NWAYREadvertise c5e1
        Negotiated connection: FullDuplex 100 Mbs
    I think link is up - while pinging green diode pulses.

    I will check pinmux. Thank you for tips.

  • Hi Kamila,

    Great.. Thanks for updating. 

    I will wait for your response on resolution on this.

    Thanks