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.

Network problem in EK-TM4C1294XL

Other Parts Discussed in Thread: EK-TM4C1294XL, CCSTUDIO

Hi,

I was learning TM4C129X and TI-RTOS by evaluation kit EK-TM4C1294XL. Firstly, I imported the example "empty" from tirtos_tivac_2_00_00_22. Secondly, comment of "Board_initEMAC()" in main() was removed. Lastly, the NDK is globally added and TCP/IP/ICMP/EMAC are enabled by XGCONF. EMAC driver was also added in. Rebuild the project and load it into target. Ping target IP address, the host can receive ping reply from target.

But when I modified NDK task priority level LOW/NORMAL/HIGH/KERNEL from 3/5/7/9 to 3/6/8/10, the host can not receive ping reply from target. I was puzzled because nothing but the NDK task priority level was modified.

In addition, when I comment out the "System_printf("...")" in function main(No modification in any other code), the same thing will also happen. I was completely puzzled.

Could anyone give me some guidance? Thanks a lot!

Best Regards.

Jason Jia.

  • Hi Jason,

    Are you seeing similar problems if you run a standard example like "tcpEcho"?

    There is a known issue with the EMAC hardware on the TivaC board.  It causes very flaky network connections (sometimes it works, sometimes it doesn't).

    Please see this post for details and a possible workaround.

    Steve

  • Thank you very much, Steve!

    Your suggestion solved my problem perfectly!

    In the example "tcpEcho", this problem has been fixed.

    Best Regards.

    Jason.

  • Hi, steve

    I am sorry that the problem still exsists.

    When I add a "heartBeat" task in example "tcpEcho", the same thing will happen as the "Empty" example.

    So I export all the EMAC registers of both situations. I find when the target is not pingable, EMAC can not send out any enet frames. The DMA is copying data to TX FIFO all the time and waiting for status. There is data in the TX FIFO as if the Tx controller does not work.

    You can find the DMA descriptor in the RAM. From the EMAC registers, It seems that the TX DMA or Tx Controller just like frozen.

    I think it is the same problem with this post:

    http://e2e.ti.com/support/embedded/tirtos/f/355/p/322514/1160751.aspx

    I'll try to find the root cause. If you have new idea, please be generous to share with me.

    Jason

     

  • Steven Connell said:

    There is a known issue with the EMAC hardware on the TivaC board.  It causes very flaky network connections (sometimes it works, sometimes it doesn't).

    Please see this post for details and a possible workaround.

     Hi Steven, I am quite new to TIRTOS to know in deep, I am try'ng to develop a network UDP/TCP application, I checked a lot of example code on TIVAWARE then I discovered TIRTOS is the better way.

     I imported project to CCstudio 6.0.0.00190 TIVAWARE TIRTOS latest version, platforrm is linux due all my code is Linux based more detail here:

    http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/p/339014/1183982.aspx#1183982

     Same UDP-Echo code is not working on DK-TM4c129 and is perfectly working on EK-TM4c1294, I discovered the most stable application is FREERTOS demo where CPU is run @80MHz instead of 120, where can I get/set CPU speed on TIRTOS and also debug multiple thread of dsame function when another instance get activated.

  •  HI, after reading all user guides of TIRTOS and SYS/BIOS I found the function getting/setting the cpu clock.

     After apply of scaling speed @100MHz problem I experienced on DK-TM4 disappeared.

     my EK-TM doesn't suffer this issue on same untouched code.

         xdc_runtime_Types_FreqHz cpuFreq;

        BIOS_getCpuFreq(&cpuFreq);
        cpuFreq.lo = 10*(cpuFreq.lo/12);
        BIOS_setCpuFreq(&cpuFreq);

  •  Hi Jason, I see you checked my post as verified, this patch has solved your issue?

     If yes please also check Steven post, both are needed to solve issue.

     Reading manual I found Clock can be set on CFG configuration, I am still in reading manuals progress.

     I also suffering some more  trouble when I try add code to this example, just adding 2 variable, one integer for counting character and one char pointer to manipulate data, this code line: tmpbuffer=buffer; code stop working and DHCP forever fail.

     Same failure if I declare a global variable.

    Are some arcane setting are required to add variable or code to task?

  • I'm adding this to all threads regarding TM4C129 devices and Ethenet....

    Please refer to the following link: http://processors.wiki.ti.com/index.php/TI-RTOS_TM4C129_Emac_Issues

  • Yes, you are right. Roberto. Both of  Steven's and your posts are essential to solve this issue.

    In fact, I am not a beginner of SYS/BIOS. When I see your post, I modified the clock rate in XGCONF. Then the issue is solved!

    Later, I made several other attempt. And I find:

    1.  Clock rate must be set lower than 100M (It has been stated in your post). 80M is a good choice. 100M or higher will cause unreliable.  

    2.  Disable the pre-fetch and insert a little time delay before hardware initialization such as below(note that the time delay is a must):

    3. Make sure that you are using tirtos_tivac_2_00_01_23 or higher version. Pre-fetch will be enable again in the EMAC driver. See function "EMACSnow_NIMUInit" in file EMACSnow.c.  Here is the code cut out of it.

    Then, your issue should be able to be solved!  I think  no other arcane setting are required. Have a try!

    I am thankful to you all, Steven, Roberto, and others who gave me a hand! Thank you, Steven! Thank you, Roberto!

    Jason.

     

     

  • linzhuang jia said:

    Then, your issue should be able to be solved!  I think  no other arcane setting are required. Have a try!

    I am thankful to you all, Steven, Roberto, and others who gave me a hand! Thank you, Steven! Thank you, Roberto!

    Jason.

     Hi Jason, thank also to you, all together we finally solved and we need stay in touch to prepare for reliable production.

     After applying last patch and rebuilding the library, my DK-TM4c129x is now stable @100MHz, all is ok and IP address get acquired in no more than 2 second. On monday  I try code on EK too.

     May be it work @120MHz too, but now client is ported from Linux code and work reliably and faster than I expected, is comparable or faster than internal Linux TASK on an I7.

     The worst is that I am a beginner on TIRTOS, I started read manuals on Tuesday and a lot of skill has to be acquired too. NDK has function similar to Linux/BSD but parameter are slightly different, not a so big trouble network is solved, no display driver is in place so I start a new thread asking for some help on how to use.

     Thank again to all.

  • I was having the same problem where the udpEcho_TivaTMC1294NCPDT works fine but the tcpEcho_TivaTMC1294NCPDT usually fails to return a network address.  I changed the tcp version to use the netOpenHook like the udp version without any other changes except for the EMAC initialization bug fix and the tcp version works fine now.