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.

TM4C129ENCPDT: TM4C129ENCPDT Ethernet not working.

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

Hi,

I have programmed a serial to Ethernet converter and have tested it successfully on EK-TM4C1294XL Launchpad. Now I have shifted to a custom board designed fir this facility. When I run the code, Ethernet is detected on my PC and the LED on custom board also glows. I am also able to acquire the static IP for the board, But I am not able to open the configuration webpage from the acquired IP. Also I am not able to get any ping of PC with the device.(I checked using MS-DOS). I visualised the data using wireshark utility.

Also here I am able to detect Ethernet on my laptop . I am sending the ICMP packet from my laptop's ip: 192.168.1.130 to the static IP assigned to the custom made board: 192.168.1.5. For the board, the subnet mask is 255.255.255.0 and the default gateway is 192.168.1.1.

For my laptop, the subnet mask is 255.255.255.0 and the default gateway is 192.168.1.1.

But, when I connect it to the Launchpad, everything works fine with the same code. I am also getting response ICMP packet from the board to the laptop's ip.

What can be the error? IS there some error in configuration or the hardware?

Regards,

Apoorv

  • Hello Apoorv,

    Is the code the same or did you have to make any modifications when switching to your custom board? If the configuration worked with the same code, same router, same cabling, and same laptop - then I would suspect the hardware before anything, but it is not clear what is the same/different between your custom board vs the LaunchPad test setup.

    Have you tested multiple of these custom boards?

    When making the custom board, did you follow the System Design Guidelines document in detail - especially for Ethernet sections?: www.ti.com/.../spma056
  • Hi Ralph,

    Thanks for the quick reply. I am able to send and receive UDP packets from the board to my laptop and vice-versa. But still the ping is still not coming. It is an ICMP packet.

    Also, the speed is supposed to be 100 Mbps, but its coming out to be 10 Mbps only. Also I am using lwip stack, and I am unable to open the configuration webpage. 

      

                                                                                            

    Also, in the code, I have set CHECKSUM_GEN_ICMP as 0 in lwipopts.

    #define CHECKSUM_GEN_ICMP               0

    Also. the laptop ip is 169.254.254.41 and the board server ip is 169.254.254.38. The board is replying the tcp packets, but is not responding to the http request sent by the laptop.

    Regards,

    Apoorv

  • Hello Apoorv,

    While more information is always good, so thanks for further details, your reply has not answered a single one of my asked questions.
  • Hi Ralph,

    The code is same for both boards. However the LAN cable is different. I have only 1 custom board.But the LAN cable is not faulty since I am able to successfully send and receive UDP packets. I checked the document, all the System Design Guidelines have been followed as it is, but the buffer has been shorted (the ESD protection buffer after the Pulse transformer) as shown in EK-TM4C1294XL datasheet.

    The biggest difference is that the custom based board has TM4C129ENCPDT while the Launchpad has TM4C1294NCPDT. However I compiled the code for TM4C129ENCPDT in ccs and somehow it was running in the launchpad which has TM4C1294NCPDT. I checked that there were no major differences between the two, but now I feel that the problem is because of this only.

    Regards,
    Apoorv

  • Hi AG,

    I don't think omitting ESD protection device would have the effect to reduce link speed auto detection yet noise on the wire might. Values of both TCT/RTC bypass caps 100nf-3300nf near (Bob Smith) may have some aspect to arrest signal noise levels when higher than expected.

    Also about a point in your comments,,, acquired IP's from a DHCP server are not static they are dynamic IP.

  • BTW your PC connection perhaps is half duplex ? no RXD data into PC would inhibit ICMP response from custom board. Check with scope around Pulse XFMR pads for solder splash or cold connections.
  • Hi,

    I tried changing my laptop's configuration from automatic to 100 Mbps full duplex, but still its giving 10 Mbps only. Also, I can successfully send and receive UDP packets from laptop to board and vice versa, but along with receiving the UDP packet, my laptop sends an ICMP packet to the board which is "not reachable". I am not able to get response to ICMP packet(ping) and also I am unable to register http GET requests. I can't understand how I am able to send and receive UDP packets but not http requests. Also, the same code works with TM4C1294NCPDT . I am only facing the problem with the custom based TM4C129ENCPDT board.



    I am checking for loose connections and capacitors, however, are all configurations correct?

    Also, in the following statement of code in httpd.c, the pbuf p is NULL because of which the http request is not registered for the custom TM4C129ENCPDT board.

    static err_t
    http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)
    {
      err_t parsed = ERR_ABRT;
      struct http_state *hs = (struct http_state *)arg;
      LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_recv: pcb=%p pbuf=%p err=%s\n", (void*)pcb,
        (void*)p, lwip_strerr(err)));
    
      if ((err != ERR_OK) || (p == NULL) || (hs == NULL)) {
        /* error or closed by other side? */
        if (p != NULL) {
          /* Inform TCP that we have taken the data. */
          tcp_recved(pcb, p->tot_len);
          pbuf_free(p);
        }
        if (hs == NULL) {
          /* this should not happen, only to be robust */
          LWIP_DEBUGF(HTTPD_DEBUG, ("Error, http_recv: hs is NULL, close\n"));
        }
        http_close_conn(pcb, hs);
        return ERR_OK;
      }
    
    #if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND
      if (hs->no_auto_wnd) {
         hs->unrecved_bytes += p->tot_len;
      } else
    #endif /* LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND */
      {
        /* Inform TCP that we have taken the data. */
        tcp_recved(pcb, p->tot_len);
      }



    Apoorv

  • Hi,

    I am successfully able to send and receive UDP packets from board to laptop and vice versa. However, I am still unable to open the http webpage , get ICMP packet response(ping) and get ethernet running at 100 Mbps. It runs at 10 Mbps in custom board. Are all of these related?

    Also when I tried to force connection at 100 Mbps ,

    (I made the followinng changes in lwipopts.h:

    #define EMAC_PHY_CONFIG (EMAC_PHY_TYPE_INTERNAL | EMAC_PHY_INT_MDIX_EN |
     EMAC_PHY_INT_ROBUST_MDIX       |             EMAC_PHY_FORCE_100B_T_FULL_DUPLEX)

    The link does not come up in custom board.Rest all cases, I am able to detect ethernet with 10mbps if I don't use force. In all cases, the speed comes 100Mbps in the eval kit.

    I have used the following schematic for custom board:

  • Hi,

      If the same code works on the LaunchPad but not your custom board then it is most likely not a software issue. I will suggest a few things.

      1. Do you have another board that you can try? Will you get the same problem? 

      2. Can you try DHCP instead of static address. Is it possible that your static address is not registered with your gateway/router. By assigning static IP directly to your MCU I wonder if the port forwarding could be removed from the gateway. Try DHCP and see if that helps. Please check with your IT department if any firewall in place and how static IP address is handled.  We are not expert in this field. 

      3. I also see "no response found" in one of the ping packets but it looks like more a wireshark issue. When I expand the packet it looks proper. Did you use the window ping command? It should send 4 echo requests by default as shown below. What did you get?

      4. Can you try one of the TivaWare ethernet examples like enet_iot or enet_lwip on both your LaunchPad and custom boards?

  • Hi AG,

    Again the 2 caps C79,C80 you selected as 100nf can be made high as 3300nf if perchance the device layer MLID is not forming a MAC frame with the host. Might explain why UDP packets seem to get out on the wire while TCP can't begin to make a connection and ping multicast packets from host are being dropped like hot potatoes by LWIP lower layers. UDP is connectionless ports and no MAC frame is required if I recall correctly.

    Perhaps you did not remove the copper clad from under the pulse inductor, RJ45 connector? Something along those lines might effect the Bob Smith terminator and overall signal quality. Posting a scope capture of the TX/RX pair signals would have been my first request prior to schematic.
  • BTW schematic check, Ethernet out pins 4-5 are open and 7-8 feed directly to ground, all pins omit required 75 ohm terminators. Your PCB layout deviates far from the recommended but can be fixed with a quick solder bridge pins 4-5 add a 75 ohm to FGND or AGND plane. Perhaps cut trace from pins 7-8 leading direct to FGND, add 75 ohm + capacitor (1000pf/2kv) Bob Smith terminator.

  • Hi BP101,
    Thanks for all the suggestions. In the datasheet it was mentioned that the HX1198FNL is the preferred transformer for best Ethernet performance. Apoorv's schematic shows a different part. I think this will be something to be checked as well.

  • Hi Charles,

    Agree the Ethernet connection medium can be very touchy with the differential pairs location routing and overall length as well. Hope the HX1198FLNT works ok on our custom PCB, it too was another choice mentioned of the two recommended transformers.
  • Hi,
    I interchanged the HX1188FLNT on the custom board with the HX1198FLNT present in the launchpad. Still, I am not able to get ping and open the webpage in the custom board. And for the Launchpad, the code still works. I also tried a DHCP server but still no luck.

    In reply to BP101's query, "Ethernet out pins 4-5 are open and 7-8 feed directly to ground, all pins omit required 75 ohm terminators. Your PCB layout deviates far from the recommended but can be fixed with a quick solder bridge pins 4-5 add a 75 ohm to FGND or AGND plane", for which component pin nos 4,5,6 and 7 are you talking about? There are no 2 separate ground FGND and AGND in my schematic.

    Also, I don't have Bob Smith terminator in the circuit. Is it the RC circuit and will it make a difference ?

    I also fear that the micro-controller present in the Launchpad is TM4C1294NCPDT while my custom board has TM4C129ENCPDT. The code has been compiled for TM4C129ENCPDT in ccs project build properties and I am flashing the same binary for both TM4C1294NCPDT and TM4C129ENCPDT. Is having the different microcontroller creating the problem?

    Regards,
    Apoorv
  • APOORV GARG said:
    ", for which component pin nos 4,5,6 and 7 are you talking about?

    The Ethernet out RJ45 jack and check again I edit post 75 ohm Bob Smith terminator has 1000pf/2kv cap to some ground point.

    APOORV GARG said:
    There are no 2 separate ground FGND and AGND in my schematic.

    .

    Technically the fork shaped ground symbol is considered frame/chassis ground and the lined ground symbol is analog ground plane back side of 2 sided PCB. Triangle shape is digital ground often tied to analog ground somewhere through VIA on top side PCB. Datasheet NCPDT Figure 20-13 may differ from ENCPDT, from my limited understanding ENCPDT is different in 256kb data encryption support is built into EMAC0.

    Charles might be better to explain any difference that might effect the Bob Smith terminator on the pulse transformer between MCU types. My guess there is very little if any difference (Bob S.) unless ENCPDT adds Gigabit over copper wire.

  • Hi BP101, AG,
    There is no difference between TM4C1294NCPDT and TM4C129ENCPDT. It is the same EMAC and PHY. It the same die with different part numbers with different features enabled/disabled.
  • Agree can't find any difference in the EMAC0 of ENCPDT & NCPDT and both have Crypto tables in ROM to my surprise. Not sure what feature differs as Package Information table A.1 skips explanation of E suffix on the series identifier SSS.

    Others in forum have mention the IOT server and embedded firmware also differs to connect to the cloud. Seemingly the NCPDT should be able to preform SSL 128bit data encryption algorithms over EMAC0 with access to the embedded ROM tables.
  • Hi,

    Is there any other thing to be changed to change the processor from TM4C1294NCPDT to TM4C129ENCPDT in code composer studio except for the startup.ccs file and the processor name in project properties?

    Also, I added the Bob Smith Terminator for chasis ground, but still no change.

    I tried to debug using the code and found that the pbuf p in http_recv in httpd.c is returning NULL due to which the webpage is not opening.

    What can be the reason for it?

    Also what are the ways to further debug the hardware?

    static err_t
    http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)
    {
      err_t parsed = ERR_ABRT;
      struct http_state *hs = (struct http_state *)arg;
      LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_recv: pcb=%p pbuf=%p err=%s\n", (void*)pcb,
        (void*)p, lwip_strerr(err)));
    
      if ((err != ERR_OK) || (p == NULL) || (hs == NULL)) {
        /* error or closed by other side? */
        if (p != NULL) {
          /* Inform TCP that we have taken the data. */
          tcp_recved(pcb, p->tot_len);
          pbuf_free(p);
        }
        if (hs == NULL) {
          /* this should not happen, only to be robust */
          LWIP_DEBUGF(HTTPD_DEBUG, ("Error, http_recv: hs is NULL, close\n"));
        }
        http_close_conn(pcb, hs);
        return ERR_OK;
      }
    
    #if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND
      if (hs->no_auto_wnd) {
         hs->unrecved_bytes += p->tot_len;
      } else
    #endif /* LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND */
      {
        /* Inform TCP that we have taken the data. */
        tcp_recved(pcb, p->tot_len);
      }
    
    #if LWIP_HTTPD_SUPPORT_POST
      if (hs->post_content_len_left > 0) {
        /* reset idle counter when POST data is received */
        hs->retries = 0;
        /* this is data for a POST, pass the complete pbuf to the application */
        http_post_rxpbuf(hs, p);
        /* pbuf is passed to the application, don't free it! */
        if (hs->post_content_len_left == 0) {
          /* all data received, send response or close connection */
          http_send_data(pcb, hs);
        }
        return ERR_OK;
      } else
    #endif /* LWIP_HTTPD_SUPPORT_POST */
      {
        if (hs->handle == NULL) {
          parsed = http_parse_request(&p, hs, pcb);
          LWIP_ASSERT("http_parse_request: unexpected return value", parsed == ERR_OK
            || parsed == ERR_INPROGRESS ||parsed == ERR_ARG || parsed == ERR_USE);
        } else {
          LWIP_DEBUGF(HTTPD_DEBUG, ("http_recv: already sending data\n"));
        }
    #if LWIP_HTTPD_SUPPORT_REQUESTLIST
        if (parsed != ERR_INPROGRESS) {
          /* request fully parsed or error */
          if (hs->req != NULL) {
            pbuf_free(hs->req);
            hs->req = NULL;
          }
        }
    #else /* LWIP_HTTPD_SUPPORT_REQUESTLIST */
        if (p != NULL) {
          /* pbuf not passed to application, free it now */
          pbuf_free(p);
        }
    #endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */
        if (parsed == ERR_OK) {
    #if LWIP_HTTPD_SUPPORT_POST
          if (hs->post_content_len_left == 0)
    #endif /* LWIP_HTTPD_SUPPORT_POST */
          {
            LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_recv: data %p len %"S32_F"\n", hs->file, hs->left));
            http_send_data(pcb, hs);
          }
        } else if (parsed == ERR_ARG) {
          /* @todo: close on ERR_USE? */
          http_close_conn(pcb, hs);
        }
      }
      return ERR_OK;
    }
    

    Regards,

    Apoorv

  • APOORV GARG said:
    What can be the reason for it? Also what are the ways to further debug the hardware?

    Has not that already been advised to post scope capture of the TXD/RDX signals, may reveal underlying signal issue? Would not auto negotiate fail 100MB connection to host if poor signal quality? You are certain the host Ethernet is not the problem?

    Question was asked not answered if solid copper clad existing under Pulse transformer either side of PCB or internal layers? Question also asked about Pulse center tap bypass (cap value) was not answered and highly relative to PCB layout of 3v3 bus.

    APOORV GARG said:
    Also, I added the Bob Smith Terminator for chassis ground, but still no change

    Did you check for high resistance shorts between Ethernet differential pairs prior to populating PCB?

    Again a scope capture of the signal quality would make that more or less relative proceeding with PCB debugging.  

  • APOORV GARG said:
    I tried to debug using the code and found that the pbuf p in http_recv in httpd.c is returning NULL due to which the webpage is not opening.

    Perhaps the Ethernet interface to EMAC0 PHY is not producing any packets for the software to retrieve from HTTPD Pbuf?

    Looking again at schematic I noticed there are no pull up resistors or bypass caps on EMAC0 RXD/TXD lines.  Perhaps you could add the required 4 (49R9,1%) and 2 (0.1uf) close to MCU pins RDX/TXD.

  • On U22 protection device you don't have pin 1 connected to 8, 2 to 7 etc, as on reference schematic. This is huge difference...
  • Hi all,

    1. Launchpad Tx waveform snapshots.

    Launchpad_TX

    1. Launchpad Rx waveform snapshots.

    3. Tonbo S2E Tx

    4. We have the pull-up resistor connected in our circuit as suggested in the previous post.

    5. The circuit is open between the ethernet differential in the bare PCB. 

     

  • Hi Pawel,

    Not my post you are referring about U22. Original poster stated ESD protection was not connected. The question of the required 4 (49R9,1%) and 2 (0.1uf) close to MCU pins RDX/TXD was not yet answered by the original poster Alpov Apoorv.

    Not sure who Nandish is working with and why he posted a capture of launch pad TXD/RXD signals let alone what Tonbo S2E represents or why it was even included.

    Typically a (loop back R45 plug) is made/installed for custom PCB RJ45 jack so a round robin (echo) test can be verified at the MCU pins or primary side of the Pulse transformer. You can program the Ethernet software to send a constant binary pattern (1010.1010) which will appear as a 50% duty cycle signal on both TXD/RXD mixed in with the carrier signal. Another though more tedious production method might TXD send packets on the wire and Print them out via UART serial port if one exists. 

  • Hi,

    I am Nandish and team member with Apoorva working this project "Tonbo S2E". Since Apoorva is on leave, I have to post the results.

    Regarding BP101 suggestion,

    Yes, we have made the modification as suggested "4 (49R9,1%) and 2 (0.1uf) close to MCU pins RDX/TXD" in our PCB.

    We shall try the loopback and also send data at TX and print on UART serial port.

  • Hi Nandish,

    Your Tonbo-s2e in this forum typical name is custom PCB. Tonbo TXD capture is not what we would expect 4.2v Pk is much higher than LP 80mv TX/RX capture, probe same pins as LP?

    Perhaps check datasheet Ethernet section 27.19 figure 27-37 & table 27.39. Another thought is MOSC 25Mhz XTAL must be qualified type shown in datasheet table for EMAC0 PHY to function correctly.