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/EK-TM4C1294XL: Devising TM4C Ethernet module Self-Test

Part Number: EK-TM4C1294XL
Other Parts Discussed in Thread: TM4C1294NCPDT

Tool/software: TI-RTOS

Dear All,

I am working on devising a way to test the TM4c1294ncpdt integrated Ethernet module. Before we establish the connection to our designated server using Ethernet, we need to devise a way to make sure the MCU's integrated Ethernet module is working fine. When going through TI forum searching for required information, i came across a post where it was mentioned that Ethernet module can be tested using Internal loop back. What i cannot find is the minimum code that i am gonna need to test the Ethernet module. For example, when testing SPI protocol, we send some data through Tx buffer and the same data is received back at Rx buffer when loop back is enabled. For SPI, it is quite simple as you do not have to write many many lines of code. You just write driver for SPI communication and then enable the loop back using respective register. Is there any way i can use the same approach to test the TM4C Ethernet module while having not much information about how networking communication works? Any help in this regard shall be highly appreciated.

Thanks,

Muhammad Shuaib

  • HI Muhammad Shuaib,

    Are you referring to http://www.ti.com/lit/ds/symlink/tm4c1294ncpdt.pdf, Page 1630: Ethernet PHY Built-In Self test? 

    Vikram

  • Hi Vikram,

    Thanks for the quick response.

    I am trying to devise a way to verify if the Ethernet module is "OKAY" before any connection is established to outer world. And yes, i was referring to BIST register. The problem i am facing is, unlike SPI or I2C where we can simply enable the loop back and receive the send data bits back in Rx buffer, Ether net is very very complex communication protocol and writing a self-test code from scratch for it would be a project in itself. Can you please guide me on how can i, if possible, devise a self-test for Ethernet module?

    Thanks
    Muhammad Shuaib
  • Muhammad,

    The TM4C Ethernet has internal loopback (check register EMACCFG), but i dont think it is useful for what you are looking for as for IP like Ethernet loopback is not enough.

    Below are few options for checking Ethernet sanity

    1. If you are using DHCP you can use IP address configuration.

    2. Wait for Ethernet initialization and check MAC error registers and statistics registers for any issues. Registers like record log EMACRXCNTGB, EMACRXCNTCRCERR should be good indicator of MAC status.

  • Hi Prasad,

    Thanks for taking the time to contribute to this post.

    We shall be using Ethernet module using TI RTOS libraries or the NDK. So i can say WE shall not be controlling the lower level initialization and configuration of Ethernet module. Can two of the suggested solutions above still be used? Or should we look for another solution that we can use? Your suggestions shall be highly appreciated in this regard.

    Thanks,
    Muhammad Shuaib
  • Muhammad,

    The NDK IP address hook function can be used in your application but note that it will be useful only in case of dynamic IP.

    IP hook function is called from NDK when IP address is assigned in stack so in DHCP it will act as sanity test for initial packet transfer.

    In addition to this most of NSP have statistics IOCTL/function enabling application to read HW stats.

  • There was a suggested answer and since there has been no active on this thread for more than a week, the suggested answer was marked as verify. Please feel free to select the "Reject Answer" button and reply with more details.