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.

10 Mbit ping fail

Other Parts Discussed in Thread: TMS320C6747, OMAPL138

Hello. I have following configuration:

Hardware configuration: Board on TMS320C6747 chip with PHY KSZ8031RNL. Hub "Eline" (It able to connect on 10 Mbit half duplex ). Switch "Compex DS 2216" (It able to connect  100 Mbit full duplex)

Software configuration: CCS 4.2.1, NDK 2.20.0.19

This is my problem:
If I plug cable from my board to 10 Mbit device, then link fail (ping is absent). Both led indicator on my board connector and on hub port is active. In console a see following strings:

TCP/IP Stack Example Client
Using default MAC address
Using MAC Address: 00-08-ee-03-14-77
MAC Address = 00-08-ee-03-14-77
EMAC should be up and running
EMAC has been started successfully
Registeration of the EMAC Successful
Network Added: If-1:192.168.137.251
Service Status: Telnet : Enabled : : 000
Service Status: HTTP : Enabled : : 000
Link Status: 10Mb/s Half Duplex on PHY 0

... if I unplugged cable from 10 MBit hub and plug it to 100 Mbit switch, then follow strings appear:

Link Status: No Link on PHY 0
Link Status: 100Mb/s Full Duplex on PHY 0

...and ping is Ok.



Then, I tried to using DHCP, then link fail too.

TCP/IP Stack Example Client
Using default MAC address
Using MAC Address: 00-08-ee-03-14-77
MAC Address = 00-08-ee-03-14-77
EMAC should be up and running
EMAC has been started successfully
Registeration of the EMAC Successful
Service Status: DHCPC : Enabled : : 000
Service Status: Telnet : Enabled : : 000
Service Status: HTTP : Enabled : : 000
Service Status: DHCPC : Enabled : Running : 000
Link Status: 10Mb/s Half Duplex on PHY 0

...some time later...


Service Status: DHCPC : Enabled : Fault : 002
Service Status: DHCPC : Disabled : : 000
Service Status: DHCPC : Enabled : : 000
Service Status: DHCPC : Enabled : Running : 000

...and if I unplugged cable from 10 MBit hub and plug it to 100 Mbit switch, then follow strings appear:

Link Status: No Link on PHY 0
Link Status: 100Mb/s Full Duplex on PHY 0
Network Added: If-1:192.168.137.65
Service Status: DHCPC : Enabled : Running : 017

and ping 192.168.137.65 work fine.

If plug to 10 MBit, In sniffer ("Wireshark") I don't see any activity from my board. It does not respond even to ARP request.

I don't know, what happens. All string on console is correct, all led indicators is active. I don't change "client" example code, or NDK source code.

PS. Any time ago I wrote to this forum about problem like this. But this is new problem. The old problem was solved by a enable timer.

  • Alexander Kurko said:

    If I plug cable from my board to 10 Mbit device, then link fail (ping is absent). Both led indicator on my board connector and on hub port is active. In console a see following strings:

    TCP/IP Stack Example Client
    Using default MAC address
    Using MAC Address: 00-08-ee-03-14-77
    MAC Address = 00-08-ee-03-14-77
    EMAC should be up and running
    EMAC has been started successfully
    Registeration of the EMAC Successful
    Network Added: If-1:192.168.137.251
    Service Status: Telnet : Enabled : : 000
    Service Status: HTTP : Enabled : : 000
    Link Status: 10Mb/s Half Duplex on PHY 0

    ... if I unplugged cable from 10 MBit hub and plug it to 100 Mbit switch, then follow strings appear:

    Link Status: No Link on PHY 0
    Link Status: 100Mb/s Full Duplex on PHY 0

    ...and ping is Ok.

    This seems normal to me.  If you unplug the cable, this causes the message:

    Link Status: No Link on PHY 0

    When you plug the cable into the 100Mb switch, it obtains link status again, this time to the 100 Mb switch, hence the following message:

    Link Status: 100Mb/s Full Duplex on PHY 0

    Alexander Kurko said:

    Then, I tried to using DHCP, then link fail too.

    TCP/IP Stack Example Client
    Using default MAC address
    Using MAC Address: 00-08-ee-03-14-77
    MAC Address = 00-08-ee-03-14-77
    EMAC should be up and running
    EMAC has been started successfully
    Registeration of the EMAC Successful
    Service Status: DHCPC : Enabled : : 000
    Service Status: Telnet : Enabled : : 000
    Service Status: HTTP : Enabled : : 000
    Service Status: DHCPC : Enabled : Running : 000
    Link Status: 10Mb/s Half Duplex on PHY 0

    ...some time later...


    Service Status: DHCPC : Enabled : Fault : 002
    Service Status: DHCPC : Disabled : : 000
    Service Status: DHCPC : Enabled : : 000
    Service Status: DHCPC : Enabled : Running : 000

    How long does it take before you see this "Fault" happen?  What activity is going on on your board when this occurs? Is there some send/receive going on? Or is it just idling for some time, and then you see that message?

     

    Alexander Kurko said:

    ...and if I unplugged cable from 10 MBit hub and plug it to 100 Mbit switch, then follow strings appear:

    Link Status: No Link on PHY 0
    Link Status: 100Mb/s Full Duplex on PHY 0
    Network Added: If-1:192.168.137.65
    Service Status: DHCPC : Enabled : Running : 017

    Again, the above seems normal.  Link missing due to unplugged cable, then re-established once plugged into 100Mb switch.  I also tried this and got the same result.  Ping worked, then stopped responding when the cable was unplugged, and then worked again once plugged into my 100Mb switch.

    Alexander Kurko said:

    If plug to 10 MBit, In sniffer ("Wireshark") I don't see any activity from my board. It does not respond even to ARP request.

    If your TMS320C6747 board is plugged into the hub, but your PC that you are running Wireshark on is plugged into the network a different way (e.g. via the 100Mb switch or other). then Wireshark will not see the packets from your board.

    To fix this, can you try plugging the Ethernet cable of your PC into the same 10Mb hub that your TMS320C6747 board is plugged into, and then running Wireshark?  Do you see data from the board in Wireshark then?

    Steve

     

  • Steven Connell said:

    This seems normal to me. If you unplug the cable, this causes the message:
    Link Status: No Link on PHY 0
    When you plug the cable into the 100Mb switch, it obtains link status again, this time to the 100 Mb switch, hence the following message:
    Link Status: 100Mb/s Full Duplex on PHY 0

    Of course, I understand, what this message is not mistake. It is very good, what this message is appear in console.

    Steven Connell said:

    How long does it take before you see this "Fault" happen? What activity is going on on your board when this occurs? Is there some send/receive going on? Or is it just idling for some time, and then you see that message?

    About 3 minutes.

    This is "client" example. I got it from NSP folder, and don't modify. As far as I understand, this example up the DHCP, HTTP and TELNET server and just idle the incoming requests.

    Steven Connell said:

    If your  TMS320C6747 board is plugged into the hub, but your PC that you are running Wireshark on is plugged into the network a different way (e.g. via the 100Mb switch or other). then Wireshark will not see the packets from your board.

    Of course, I know about that. And I plug my board and my PC into one hub. And I can see any activity from the board and from PC.

      Above  I showed listing to make it clear that 10Mbit connection is not working regardless of whether using DHCP or not.

  • Would you be able to please build your project so that it uses DHCP to get the IP address, and then zip up your *entire* project and then attach it to this forum?

    I'd like to try running what you have locally on my setup.

    Steve

  • Ooo! Thank you for your replay. This is "client" project from "NSP" folder. But I am change "gel" file according to my board. And change EMAC_initialize() function. I am add to this function reset of my PHY device and comment configuration of PINMUX of MDIO. In StackTest() function I am enable OBSCLK clock for PHY device.

    5444.client_new.zip

  • Hi Alexander,

    What board are you using exactly? Are you using the evm6747 board?  Or are you on a custom board and just using the C6747 DSP?

    I was able to build the project, however I had to comment out the following code in client.c since I had some build errors for members of 'pllcRegs':

    int StackTest()
    {
        int               rc;
        HANDLE            hCfg;
        CI_SERVICE_TELNET telnet;
        CI_SERVICE_HTTP   http;
    /*
        CSL_GpioRegsOvly gpioRegs = (CSL_GpioRegsOvly)(CSL_GPIO_0_REGS);
        unsigned long iii = 0;

        // Configuration  OBSCLK pin
        CSL_PllcRegsOvly pllcRegs = ((CSL_PllcRegsOvly)CSL_PLLC_0_REGS);   

        // Configure GPIO1_12 (GPIO1_12_PIN) as an output
        gpioRegs->BANK[0].DIR &= ~(0x00000001 << CSL_GPIO_DIR_DIR28_SHIFT);       
        gpioRegs->BANK[0].CLR_DATA = 0x00000001 << CSL_GPIO_CLR_DATA_CLR28_SHIFT; // Clear   

        pllcRegs->OCSEL = 0x19; // SYSCLK3 1 : 3
        pllcRegs->OSCDIV = (1 << 15) | (3 << 0); // Enable divider and coefficient
        pllcRegs->CKEN = pllcRegs->CKEN | (1 << 1); // Enable OBSCLK
           

        for(iii = 0; iii<12800000; iii++) { iii = iii; }
            gpioRegs->BANK[0].SET_DATA = 0x00000001 << CSL_GPIO_SET_DATA_SET28_SHIFT; // Set   
    */

    after commenting that out, I could build and run successfully, including on the 10Mbit hub.  *But* - this was on my evm6748 board.  I then noticed that the *.tcf file for the project you attached is still configured for the evmOMAPL138 board:

    /* Start with the generic evmOMAPL138 */
    utils.loadPlatform("ti.platforms.evmOMAPL138");

    This is going to bring in the memory map for the OMAPL138 board, which is most likely different than what you have.  So, this is one potential problem.

    Another issue is the project is still referencing the OMAPL138 ethernet driver (in the project linker properties):

       "${NSP_INSTALL_DIR}/packages/ti/drv/omapl138/lib/debug/ti.drv.omapl138.a674"

    I'm wondering if the problem could be due to an incorrect Ethernet driver, but then again you are able to get an IP address and ping the board when connected to 100Mbit switch ....

  • Hi, Steven

    Steven Connell said:

    What board are you using exactly? Are you using the evm6747 board?  Or are you on a custom board and just using the C6747 DSP?

    I am using custom board based on TMS320C6747 and PHY (Micrel KSZ8031RNL).

    Steven Connell said:

    after commenting that out, I could build and run successfully, including on the 10Mbit hub. *But* - this was on my evm6748 board. I then noticed that the *.tcf file for the project you attached is still configured for the evmOMAPL138 board:

    Yes, this is not quite right. But I have other projects, where I using right configuration ( utils.loadPlatform("ti.platforms.evm6747"); ), but 10 Mbit still does not work.

    Steven Connell said:

    Another issue is the project is still referencing the OMAPL138 ethernet driver (in the project linker properties):
    "${NSP_INSTALL_DIR}/packages/ti/drv/omapl138/lib/debug/ti.drv.omapl138.a674"

    This is very interesting idea, but I do not have another driver. For this processor TI offers only one variant.

    I get the source code from NSP and recompile it with my project, but result was the same. Maybe I should change any string from source code?

    PS. If I cnange follow string

    if (localDev.Config.ModeFlags & EMAC_CONFIG_MODEFLG_RMII) CSL_FINST(EMAC_REGS->MACCONTROL, EMAC_MACCONTROL_RMIISPEED, 100MBIT);

    in the EMAC_open() function from 100MBIT to 10MBIT, then my board have link on 10 Mbit, but do not have it on 100 Mbit.

  • Alexander,

    From this point, it seems to me like the problem you are having is due to the hardware configuration of the EMAC.  I think your setup may require some special driver configuration, which I'm not an expert on.

    So, I'm going to get your question sent over to the guys who better understand the EMAC hardware and drivers, as you'll be able to get better help from them at this point.

    Thanks,

    Steve

  • Thank you! I shell be wait the replay, and think about that. Maybe I shell find new idea.

  • Alexander,

    I have moded this thread to the C674x device forum so that experts there can address questions specific to the EMAC driver.

    Dave

  • Alexander, if you are using RMII, are you using a 50 PPM crystal for RMII_MHZ_50_CLK? We have seen issues when higher jitter clocks are used.

    Jeff

  • Thank you for your reply!

    Really, I am using RMII. But my PHY (KSZ 8031RNL) feeds from OBSCLK from my TMS320C6747. OBSCLK pin connected to XI pin of PHY. XO pin is not using. My TMS320C6747 feeds from external source clock 25 MHz +/- 4Hz. I checked this with a channel analyzer.

    I configure OBSCLK clock and give to my PHY 25 Mhz on XI pin, and I see on  RMII_MHZ_50_CLK pin 50 Mhz.

    I think, that if the problem was the frequency, then 100 Mbit was not working.

    PS.

    Configuration of my clock:

    Input clock: 25Mhz

    PLL multiplier = 24

    PLL post divider = 2

    OBSCLK using SYSCLK3

    OSDDIV  =  4

    that meens

    25 Mhz * 24 / 2 / 3 / 4 = 25 Mhz