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.

DM648 NDK 100Mbit ping fail

Other Parts Discussed in Thread: CCSTUDIO

Hi

    I am using LYRTECH 's DM648 EVM , with NDK 2.0.0 , CCS 3.3 .

I compiled helloworld project to test ethernet . When I plug into 1000 MBit hub , everything is fine. the message is as followed:

===============================

TCP/IP Stack 'Hello World!' Application

Using MAC Address: 00-0e-99-02-aa-23
cpsw_MDIO_Init
SetPhyMode:000021E1 Auto:1, FD10:64, HD10:32, FD100:256, HD100:128, FD1000:8192 LPBK:0
cpsw_MDIO_Init
SetPhyMode:000021E1 Auto:1, FD10:64, HD10:32, FD100:256, HD100:128, FD1000:8192 LPBK:0
 EMAC should be up and running
EMAC has been started successfully
Registeration of the EMAC Successful
Service Status: DHCPC    : Enabled  :          : 000
Service Status: DHCPC    : Enabled  : Running  : 000
cpsw_MDIO_FindingState: PhyNum: 0
cpsw_MDIO_FindingState: PhyNum: 1
cpsw_MDIO_PhYReset(0)
Enable Phy to negotiate external connection
NWAY Advertising: FullDuplex-1000 FullDuplex-100 HalfDuplex-100 FullDuplex-10 HalfDuplex-10
cpsw_MDIO_PhYReset(1)
Enable Phy to negotiate external connection
NWAY Advertising: FullDuplex-1000 FullDuplex-100 HalfDuplex-100 FullDuplex-10 HalfDuplex-10
Negotiated connection: FullDuplex 1000 Mbs
Link Status: 1000Mb/s Full Duplex on PHY 0
Network Added: If-1:192.168.1.91
Service Status: DHCPC    : Enabled  : Running  : 017
==========================

I can see ip addres is gotten from DHCP , and I ping it succesfully.

But when I unplug it and replug it into 100Mbit hub , the message become as fellowed

============================

TCP/IP Stack 'Hello World!' Application

Using MAC Address: 00-0e-99-02-aa-23
cpsw_MDIO_Init
SetPhyMode:000021E1 Auto:1, FD10:64, HD10:32, FD100:256, HD100:128, FD1000:8192 LPBK:0
cpsw_MDIO_Init
SetPhyMode:000021E1 Auto:1, FD10:64, HD10:32, FD100:256, HD100:128, FD1000:8192 LPBK:0
 EMAC should be up and running
EMAC has been started successfully
Registeration of the EMAC Successful
Service Status: DHCPC    : Enabled  :          : 000
Service Status: DHCPC    : Enabled  : Running  : 000
cpsw_MDIO_FindingState: PhyNum: 0
cpsw_MDIO_FindingState: PhyNum: 1
cpsw_MDIO_PhYReset(0)
Enable Phy to negotiate external connection
NWAY Advertising: FullDuplex-1000 FullDuplex-100 HalfDuplex-100 FullDuplex-10 HalfDuplex-10
cpsw_MDIO_PhYReset(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 45E1
Negotiated connection: FullDuplex 100 Mbs
Link Status: 100Mb/s Full Duplex on PHY 0
========================

It can't get ip anymore. Even I modified the code to use static ip , I can't ping that ip either.

Do you have any idea about this?

I have patched NDK 2.0.0.

 

Regards,

 

Clar

  • Hi Clar,

    I need to understand the scenario better, can you help clarify?

    I'm wondering if the problem is happening during a single program run, in which you are unplugging the Ethernet cable from one hub and re-plugging it into another hub?

    What I mean is, do you first have the board plugged into the 1000Mbit hub, then run the program, and *while the program is still running* unplug the Ethernet cable and then plug it into the 100Mbit hub?  And then the IP address doesn't come up?

    Or do you mean that the helloWorld app simply never gets an IP address when connected to the 100Mbit hub from the beginning of the program run?

    Next, I'm wondering which hubs you are using?  Can you give me the names or even model numbers so I can look those up?

    Finally, do you have the program Wireshark installed?  It may help to get a Wireshark capture of the packets going out on the wire.

    Thanks,

    Steve

  • Hi Steve,

    >>  I'm wondering if the problem is happening during a single program run, in which you are unplugging the Ethernet cable from one hub and re-plugging it into another hub?

    >> What I mean is, do you first have the board plugged into the 1000Mbit hub, then run the program, and *while the program is still running* unplug the Ethernet cable and then plug it into the 100Mbit hub?  And then the IP address doesn't come up?

    >> Or do you mean that the helloWorld app simply never gets an IP address when connected to the 100Mbit hub from the beginning of the program run?

    I tested both situation :

    1. I first have the board plugged into the 1000Mbit hub, then run the program, and *while the program is still running* unplug the Ethernet cable and then plug it into the 100Mbit hub.  And then the IP address doesn't come up.  

    2. I restart the program , and  plugged the Ethernet cable into the 100Mbit hub.  And then the IP address doesn't come up , neither.  

     

    >>Next, I'm wondering which hubs you are using?  Can you give me the names or even model numbers so I can look those up?

    I am using TPLink giga switch 8port.

     

    >> Finally, do you have the program Wireshark installed?  It may help to get a Wireshark capture of the packets going out on the wire.

    no , may I know what it is? and where to get it?

     

    thanks,

    regards,

    Clar

     

  • Hi Steve,

    The 1000 Mbits hub is TP-LINK TL-SG1005D Gigabit switch

    The 100 Mbits hub is DLINK DES-1005D

     

    Thanks , regards,

     

    Clar

  • Clar,

    wenchi liao said:
    1. I first have the board plugged into the 1000Mbit hub, then run the program, and *while the program is still running* unplug the Ethernet cable and then plug it into the 100Mbit hub.  And then the IP address doesn't come up.  

    Can you try this again, but change one thing.  Once you see the IP address come up and are able to ping the board when connected to the 1000Mbit hub (TP-LINK TL-SG1005D Gigabit switch), can you try to unplug the cable but then re-plug it back into the 1000Mbit switch (TP-LINK TL-SG1005D Gigabit switch).  Then, does the IP address come back and board become ping-able?

    wenchi liao said:
    2. I restart the program , and  plugged the Ethernet cable into the 100Mbit hub.  And then the IP address doesn't come up , neither.  

    Do you have a different 100Mbit switch you could try?

     

    Steve

  • Steven,

    Steven Connell said:

    1. I first have the board plugged into the 1000Mbit hub, then run the program, and *while the program is still running* unplug the Ethernet cable and then plug it into the 100Mbit hub.  And then the IP address doesn't come up.  

    Can you try this again, but change one thing.  Once you see the IP address come up and are able to ping the board when connected to the 1000Mbit hub (TP-LINK TL-SG1005D Gigabit switch), can you try to unplug the cable but then re-plug it back into the 1000Mbit switch (TP-LINK TL-SG1005D Gigabit switch).  Then, does the IP address come back and board become ping-able?

    [/quote]

    I tried. the messages is as following. And I continue to ping 192.168.1.91 , when unplug , I can't ping it (of course) . When replug , even we didn't see DHCP get ip address message , I can still ping it.


    TCP/IP Stack 'Hello World!' Application

    Using MAC Address: 00-0e-99-02-aa-23
    cpsw_MDIO_Init
    SetPhyMode:000021E1 Auto:1, FD10:64, HD10:32, FD100:256, HD100:128, FD1000:8192 LPBK:0
    cpsw_MDIO_Init
    SetPhyMode:000021E1 Auto:1, FD10:64, HD10:32, FD100:256, HD100:128, FD1000:8192 LPBK:0
     EMAC should be up and running
    EMAC has been started successfully
    Registeration of the EMAC Successful
    Service Status: DHCPC    : Enabled  :          : 000
    Service Status: DHCPC    : Enabled  : Running  : 000
    cpsw_MDIO_FindingState: PhyNum: 0
    cpsw_MDIO_FindingState: PhyNum: 1
    cpsw_MDIO_PhYReset(0)
    Enable Phy to negotiate external connection
    NWAY Advertising: FullDuplex-1000 FullDuplex-100 HalfDuplex-100 FullDuplex-10 HalfDuplex-10
    cpsw_MDIO_PhYReset(1)
    Enable Phy to negotiate external connection
    NWAY Advertising: FullDuplex-1000 FullDuplex-100 HalfDuplex-100 FullDuplex-10 HalfDuplex-10
    Negotiated connection: FullDuplex 1000 Mbs
    Link Status: 1000Mb/s Full Duplex on PHY 0
    Network Added: If-1:192.168.1.91
    Service Status: DHCPC    : Enabled  : Running  : 017
    Link Status: No Link on PHY 0
    Negotiated connection: FullDuplex 1000 Mbs
    Link Status: 1000Mb/s Full Duplex on PHY 0

     

     

    Steven Connell said:

    2. I restart the program , and  plugged the Ethernet cable into the 100Mbit hub.  And then the IP address doesn't come up , neither.  

    Do you have a different 100Mbit switch you could try?

    [/quote]

    Yes , the result is the same .

     

    thanks , regards

     

    Clar

  • Steven,

        The bios version I am using is bios_5_41_10_36 . pspdriver version is pspdrivers_1_1_03. I am not sure if ndk used them. But I installed them in my CCStudio directory.

     

    Thanks,

    regards

     

    Clar

  • Clar,

    wenchi liao said:
    When replug , even we didn't see DHCP get ip address message , I can still ping it.

    So it sounds like although the IP address is not printed out when you re-plug in the cable, the stack still comes back on line then because the ping starts working again?  But you just don't see an error message?

    Can you try to put a break point in ip address callback function "NetworkIPAddr"?  This function should be called when ever an IP address is added or removed.  Do you hit that break point when the cable is plugged back in?

    Also, you mentioned before that you were using "updated" NDK 2.0.0.  Does that mean you applied the patch mentioned in this post?

    http://e2e.ti.com/support/embedded/f/355/p/50976/236605.aspx#236605

    wenchi liao said:
    Yes , the result is the same .

    Was the other switch/hub the same model? Or a different brand.  If it was the same, can you try a different brand?

    Thanks,

    Steve

  • Steven Connell said:

    So it sounds like although the IP address is not printed out when you re-plug in the cable, the stack still comes back on line then because the ping starts working again?  But you just don't see an error message?

    Can you try to put a break point in ip address callback function "NetworkIPAddr"?  This function should be called when ever an IP address is added or removed.  Do you hit that break point when the cable is plugged back in?

    I put a break point in NetworkIPAddr .

    When I plugged it first time , it run into break point .

    When I unplugged it , it should run into break point again because of removing ip address , but it didn't .

    When I replugged it , it didn't run into break point neither. But even it didn't run into it , I can still ping it.

     

    Steven Connell said:

    Also, you mentioned before that you were using "updated" NDK 2.0.0.  Does that mean you applied the patch mentioned in this post?

    http://e2e.ti.com/support/embedded/f/355/p/50976/236605.aspx#236605

    yes , I applied this patch.

     

    Steven Connell said:

    Was the other switch/hub the same model? Or a different brand.  If it was the same, can you try a different brand?

    I tested 3COM switch , it dosen't work neither.

     

     

    Where can I get NDK 1.9.6 to test if it works?

    regards,

    Clar

     

  • Clar,

    I would recommend trying the newest NDK before moving backwards to an older NDK.

    The latest is NDK 2.20x and can be downloaded here: http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/ndk/index.html

    In order to use this version of the NDK, you will need to update your project's compiler and linker options to point to the newer NDK (set include paths to the new NDK as well as libraries to point to the ones in the later install).

    Steve


  • Hi Steve ,

        I tried NDK 2.20.04.26 , but result is the same. I did following step , did I do anything wrong?

    1. download NDK 2.20.04.26 from http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/ndk/index.html

    2.Unzip it to CCStudio_v3.3 directory . So I got a C:\CCStudio_v3.3\ndk_2_20_04_26 directory

    3. copy ndk_2_0_0\example to C:\CCStudio_v3.3\ndk_2_20_04_26\packages\ti\ndk  . So I got a C:\CCStudio_v3.3\ndk_2_20_04_26\packages\ti\ndk\example  directory

    4. copy C:\CCStudio_v3.3\ndk_2_0_0\packages\ti\ndk\src\hal\evmdm648 to C:\CCStudio_v3.3\ndk_2_20_04_26\packages\ti\ndk\src\hal , So I got a C:\CCStudio_v3.3\ndk_2_20_04_26\packages\ti\ndk\src\hal\evmdm648

    5. Change all path to C:\CCStudio_v3.3\ndk_2_20_04_26

    6. Compile hal\evmdm648 , I got a evmdm648.lib

    7. Compile example\network\helloWorld\evmdm648\helloworld.pjt , I got helloworld.out.

    8. Load program into EVM DM648



    When I plug into 100 MB hub Message is as followed:

    ========================================

    TCP/IP Stack 'Hello World!' Application

    Using MAC Address: 00-0e-99-02-aa-23
    cpsw_MDIO_Init
    SetPhyMode:000021E1 Auto:1, FD10:64, HD10:32, FD100:256, HD100:128, FD1000:8192 LPBK:0
    cpsw_MDIO_Init
    SetPhyMode:000021E1 Auto:1, FD10:64, HD10:32, FD100:256, HD100:128, FD1000:8192 LPBK:0
     EMAC should be up and running
    EMAC has been started successfully
    Registeration of the EMAC Successful
    Service Status: DHCPC    : Enabled  :          : 000
    Service Status: DHCPC    : Enabled  : Running  : 000
    cpsw_MDIO_FindingState: PhyNum: 0
    cpsw_MDIO_FindingState: PhyNum: 1
    cpsw_MDIO_PhYReset(0)
    Enable Phy to negotiate external connection
    NWAY Advertising: FullDuplex-1000 FullDuplex-100 HalfDuplex-100 FullDuplex-10 HalfDuplex-10
    cpsw_MDIO_PhYReset(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 45E1
    Negotiated connection: FullDuplex 100 Mbs
    Link Status: 100Mb/s Full Duplex on PHY 0
    Service Status: DHCPC    : Enabled  : Fault    : 002


    ==================================

    When I plug into 1000 MB bug , and restart program , message is as followig:

    ======================================

    TCP/IP Stack 'Hello World!' Application

    Using MAC Address: 00-0e-99-02-aa-23
    cpsw_MDIO_Init
    SetPhyMode:000021E1 Auto:1, FD10:64, HD10:32, FD100:256, HD100:128, FD1000:8192 LPBK:0
    cpsw_MDIO_Init
    SetPhyMode:000021E1 Auto:1, FD10:64, HD10:32, FD100:256, HD100:128, FD1000:8192 LPBK:0
     EMAC should be up and running
    EMAC has been started successfully
    Registeration of the EMAC Successful
    Service Status: DHCPC    : Enabled  :          : 000
    Service Status: DHCPC    : Enabled  : Running  : 000
    cpsw_MDIO_FindingState: PhyNum: 0
    cpsw_MDIO_FindingState: PhyNum: 1
    cpsw_MDIO_PhYReset(0)
    Enable Phy to negotiate external connection
    NWAY Advertising: FullDuplex-1000 FullDuplex-100 HalfDuplex-100 FullDuplex-10 HalfDuplex-10
    cpsw_MDIO_PhYReset(1)
    Enable Phy to negotiate external connection
    NWAY Advertising: FullDuplex-1000 FullDuplex-100 HalfDuplex-100 FullDuplex-10 HalfDuplex-10
    Negotiated connection: FullDuplex 1000 Mbs
    Link Status: 1000Mb/s Full Duplex on PHY 0
    Network Added: If-1:192.168.1.91
    Service Status: DHCPC    : Enabled  : Running  : 017
    =====================================


    I think the prlbem occured on the driver (hal\evmdm648)  , since I just copy it from NDK2.0.0 directory , but  download patch ask me to download from (
    If you wish to obtain the driver for other devices (DM6437, C6747, OMAPL137, DM648, C6455, etc.) please check the device web page for NSP (Ethernet driver package) updates or download the driver from the NDK 2.00 full package.)


    Do you know where can I download driver for DM648? I can't find any link for NSP (Ethernet driver package) updates

    Thanks ,

    Regards,

    Clar

  • Clar,

    I think your steps look OK.  But, it looks like you have rebuilt the Ethernet driver library too?  If so, can you try again but with out rebuilding the driver?  You should be able to just point your project to the Ethernet driver library that's in your NDK 2.0.0 installation, linking that in instead of rebuilding it.

    wenchi liao said:
    I think the prlbem occured on the driver (hal\evmdm648)  , since I just copy it from NDK2.0.0 directory , but  download patch ask me to download from ( If you wish to obtain the driver for other devices (DM6437, C6747, OMAPL137, DM648, C6455, etc.) please check the device web page for NSP (Ethernet driver package) updates or download the driver from the NDK 2.00 full package.)

    All this message is saying is that the NDK stopped shipping driver support for those devices in NDK 2.1 and upwards.  So, it is just telling you that the later versions of the NDK will have updated core stack libraries, but the drivers will not be there.  So for those devices you would need to find them in the NDK 2.0.0 installation.  I know this is a bit confusing, but since you are getting the Ethernet driver from NDK 2.0.0, you have already been doing the right thing.

    Can you attach you DM648 executable?  I would like to try loading and running it here to see if I can reproduce this problem.

    Thanks,

    Steve

  • Hi Steve ,

        I rebuilt the driver library because there is no prebuild library in 2.20 zip file . There is no prebuild library in 2.01 neither. Only 2.00 has one prebuild library , and I tested it since I got ndk  ,but  the result is the same .

    the .out file is built by 2.20 , the library is built by myself.

    http://dl.dropbox.com/u/21589463/helloWorld.out

     

    and another .out file is built by prebuild library in 2.0.0

    http://dl.dropbox.com/u/21589463/helloWorld%20%28built%20by%202_0_0%20lib%29.out

    Thanks ,

    regards.

    Clar

     

     

     

     

  • Clar,

    I'm able to reproduce the issue on DM648 using just the standard hello world example. It does not work at all with a 100Mbit Linksys switch.  It does work with a 1Gbit Netgear switch.

    I'm going to look into this more and get back to you.  I have a hard time believing that no one tested this on a 100Mbit switch, so not sure what's wrong here...

    Steve

  • Clar,

    This issue is due to a bug in the DM648 Ethernet driver.

    Please refer to the solution described in this post:

    http://e2e.ti.com/support/embedded/f/355/p/57649/205966.aspx

    Steve

  • Hi Steve ,

        It works! thanks! I will give you a 'Like' if this is in facebook .

    Thanks ,

    regards.

    Clar