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.

DHCP EMAC not working on Tiva EK-TM4C1294XL

Hello,

I have been having trouble with the Tiva EMAC DHCP.  I have posted a couple of forum requests but none seem to really fix the problem.  Here is were I am at right now.  When I use Code Composer to flash the 1294XL card and start the code I get a DHCP address less than 50% of the time.  I used wireshark to monitor the DHCP activity.  When I get a good DHCP address I see a correct protocol exchange between the 1294 board and my network DHCP server.  When I fail to get a DHCP address I see no DHCP packets from my 1294 board.

When I run ROV EMAC and get a good DHCP address I see the following,

rxCount = 87

rxDropped = 0

txSent = 4

txDropped = 0

When I don't get a DHCP address I see,

rxCount = 0

rxDropped = 0

txSent = 3

txDropped = 0

Another interesting item.  When I disconnect code composer and manually reset the card it gets a good DHCP address 100% of the time.  The same when the card is repower -- it gets a good DHCP address 100% of the time.

I have loaded the latest TI-RTOS but still are having problems.  Here are my TI-RTOS release numbers,

TI-RTOS 2_01_00_03

TivaWare_C_Series-2.1.0.12573c

bios_6_40_03_39

ndk_2_23_01_01

Uia_2_00_01_34


Anyone seen this before?  I have been struggling with this since June and need to get it fixed soon!

FYI...I had a TI software engineer recommend that I load the latest TI-RTOS the other day.  It looked like it fixed the problem but in the end it did not.  I just happened to get a bunch of successful DHCP trys.  Now this morning I am getting almost no successful DHCP address trys.

Best Regards,

Steve Mansfield

  • Hi Steve,

    Are you running a TI-RTOS example or your own source code?  What is the network topology?  What compiler toolchain are you currently using?

    Regards,

    -- Emmanuel

  • Hello Emmanuel,

    Yes, I am running TI-RTOS tirtos_tivac_2_01_00_03.  My compiler version is TI 5.1.6.  You will notice that  I have 3 Board_initEMAC() method calls.  I have found that if I rearrange my code sometimes DHCP will start working.  Rearranging code is a pain.  I read in one of the earlier posts that if you try more than one Board_initEMAC() during start-up often the DHCP address capture will start to work correctly.  I tried it and it does seem to help.  Here is a snippet of my main() code that initializes and starts EMAC and various application threads.

    Take a look and let me know what you think.  Thanks for your help.

    Best Regards,

    Steve Mansfield

    int main(Void)
    {

        // Initialize the Hardware
        Board_initGeneral();                                      // Initialize Tiva Board
        Board_initGPIO();                                           // Initialize GPIO Hardware
        Board_initUSB(Board_USBDEVICE);        // Initialize User USB Hardware
        Board_initUART();                                          // Initialize SCI Hardware
        Board_initEMAC();                                         // Initialize Ethernet Hardware
        Board_initEMAC();                                         // Try again...
        Board_initEMAC();                                         // and again....

        // Initialize SCI async channel
        AsyncDevice.asyncInit();

        // Initialize USB Controller
        USBCDCD_init();

        // Initialize push button drivers
        buttonInit();

        // Initialize object elements
        SoapClient.setSoftwareVersion(SfwrVersion);

        // Set up error block
        Error_Block    eb;
        Error_init(&eb);

        // Create rcvbuffer semaphore
        RcvBufferSem = Semaphore_create(0, NULL, NULL);

        // Initialize mailbox parameters
        Mailbox_Params    CmdMailboxPm;
        Mailbox_Params_init(&CmdMailboxPm);
        CmdMailbox = Mailbox_create(sizeof(Msg), 1, &CmdMailboxPm, &eb);
        if (CmdMailbox == NULL)
        {
            System_printf("main: Failed to create Command Mailbox\n");
            System_flush();
        }

        // Create PowerShell thread
        Task_Handle PsThread;
        Task_Params PsThreadPm;
        Task_Params_init(&PsThreadPm);
        PsThreadPm.stackSize = 4096;
        PsThreadPm.priority = 1;
        PsThread = Task_create((Task_FuncPtr)psthread, &PsThreadPm, &eb);
        if (PsThread == NULL)
        {
            System_printf("main: Failed to create PowerShell Thread\n");
            System_flush();
        }

        // Set Up TCP Thread
        Task_Handle TcpThread;
        Task_Params TcpThreadPm;
        Task_Params_init(&TcpThreadPm);
        TcpThreadPm.stackSize = 4096;
        TcpThreadPm.priority = 1;
        TcpThread = Task_create((Task_FuncPtr)tcpthread, &TcpThreadPm, &eb);
        if (TcpThread == NULL)
        {
              System_printf("main: Failed to create Tcp Thread\n");
               System_flush();
        }

        // Set Up Client Thread
        Task_Handle    ClientThread;
        Task_Params    ClientThreadPm;
        Task_Params_init(&ClientThreadPm);
        ClientThreadPm.stackSize = 4096;
        ClientThreadPm.priority = 1;
        ClientThread = Task_create((Task_FuncPtr)clientthread, &ClientThreadPm, &eb);
        if (ClientThread == NULL)
        {
               System_printf("main: Failed to create Client Thread\n");
               System_flush();
        }

        // set up Server Test Thread
        Task_Handle    ServerThread;
        Task_Params    ServerThreadPm;
        Task_Params_init(&ServerThreadPm);
        ServerThreadPm.stackSize = 4096;
        ServerThreadPm.priority = 1;
        ServerThread = Task_create((Task_FuncPtr)serverthread, &ServerThreadPm, &eb);
        if (ServerThread == NULL)
        {
               System_printf("main: Failed to create Server Test Thread\n");
               System_flush();
        }

        // set up DSP Demo Thread
        Task_Handle    DspThread;
        Task_Params    DspThreadPm;
        Task_Params_init(&DspThreadPm);
        DspThreadPm.stackSize = 4096;
        DspThreadPm.priority = 1;
        DspThread = Task_create((Task_FuncPtr)dspthread, &DspThreadPm, &eb);
        if (DspThread == NULL)
        {
               System_printf("main: Failed to create DSP Test Thread\n");
               System_flush();
        }

        /* Start BIOS */
        BIOS_start();

        return (0);
    }

  • Hi, 

    I have had exactly the same problem like Steve. I'm also using TIVAC TM4C1294 and tirtos_tivac_2_00_01_23.

     

    Vini

  • Vini,

    Can you move to the 2_01_00_03  release and see if this fixes the issue?

    Stephen,

    Can you confirm you are using the 2_01_00_03 release? Do you have a simple .out file that displays the issue? Could you export the project (with the binary). I'd like to see if I could reproduce the issue.


    Todd

  • Hi Todd,

    I have updated to version 2_01_00_03 and and solved my problem. Thanks.

    Vini

  • Hello Todd,


    DHCP now seem to be working.  Not sure exactly what happened but it is able to obtain a DHCP address every time.  I have had this problem for quite a while.  I had moved to TI-RTOS 2.1.0.3 two weeks and it seemed to fix the problem but then a couple of days later it stopped working.  I re-booted my PC a couple of days ago and re-built the application and it started to work correctly again.  Moving to 2.1.0.3 definitely is a must for fixing the problem.  I think the problem I was having after moving to 2.1.0.3 was most likely PC related.  Thanks for all of your help.

    Best Regards,

    Steve Mansfield

  • Hi Steve,

    I'm glad it's working. I'm pretty confident that 2.01.00.03 resolved the problem, but if you find that it still has the issue, please let us know.

    Todd