• 0
electronicsdevices

Zybo Server Demo PHY Autonegotiation Fails

Question

I get this error when running the ZYBO server demo on linux

-----lwIP TCP echo server ------
TCP packets sent to port 6001 will be echoed back
Start PHY autonegotiation
Waiting for PHY to complete autonegotiation.
Auto negotiation error
Phy setup error
Assert due to phy setup failure

I don't know what to do.

 

 

Share this post


Link to post
Share on other sites

11 answers to this question

Recommended Posts

  • 1

Hi,

I believe the problem is caused by the fact that the ethernet phy found on the Zybo might not be compatible with Xilinx's lwip. Therefore I believe the solution would be to set the speed manually (right now its on autodetect which I think is the part that fails). In order to set it manually please enter the following command in the XSCT console:

configbsp -bsp <bsp_name> phy_link_speed CONFIG_LINKSPEED1000  --to set the speed
configbsp -bsp <bsp_name> -lib lwip141   --to check if it's set
regenbsp -bsp <bsp_name>    --regenerate the bsp

Sergiu

 

Share this post


Link to post
Share on other sites
  • 0

@electronicsdevices,

If your network autonegotiation fails, check your network cable and your router.  What it means is that your ethernet PHY is trying to contact your router to determine the speed of the network, and it's not getting a response from the router.

Dan

Share this post


Link to post
Share on other sites
  • 0

I've tried several cables and it's the same result. All my other devices have a green light on my router, but plugging in my ZYBO board gives an orange light. I've tried different physical ports and its the same result.

Share this post


Link to post
Share on other sites
  • 0

Could you also specify the version of Vivado / SDK that you are using?

Please go to the XSCT console and type in the following command and tell me what it says:

configbsp -bsp <bsp_name> -lib lwip141

 

Sergiu

Edited by Sergiu

Share this post


Link to post
Share on other sites
  • 0

@jpeyron

Yes I am running Linux.

Yes I am running this demo https://reference.digilentinc.com/learn/programmable-logic/tutorials/zybo-getting-started-with-zynq-server/start

No I am not using a VM

Distro info:

Distributor ID:    Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:    16.04
Codename:    xenial

@Sergiu

I am using Vivado 2017.1 and Xilinx SDK 2017.1.

This is what the XSCT console says:

configbsp -bsp echo_bsp -lib lwip141
========================================================================
                        NAME   VALUE
========================================================================
                    api_mode   RAW_API
                 arp_options   true
                arp_queueing   1
              arp_table_size   10
               debug_options   true
         dhcp_does_arp_check   true
                dhcp_options   true
                 emac_number   0
                  icmp_debug   false
                icmp_options   true
                    icmp_ttl   255
                  igmp_debug   false
                igmp_options   false
                    ip_debug   false
              ip_default_ttl   255
                  ip_forward   0
                     ip_frag   1
             ip_frag_max_mtu   1500
                  ip_options   0
          ip_reass_max_pbufs   128
               ip_reassembly   1
                  lwip_debug   false
                   lwip_dhcp   true
             lwip_ip_options   true
         lwip_memory_options   
                  lwip_stats   false
                    lwip_tcp   true
          lwip_tcp_keepalive   false
                    lwip_udp   true
                    mem_size   131072
                 memp_n_pbuf   16
          memp_n_sys_timeout   8
              memp_n_tcp_pcb   32
       memp_n_tcp_pcb_listen   8
              memp_n_tcp_seg   256
              memp_n_udp_pcb   4
            memp_num_api_msg   16
             memp_num_netbuf   8
            memp_num_netconn   16
          memp_num_tcpip_msg   64
               n_rx_coalesce   1
            n_rx_descriptors   64
               n_tx_coalesce   1
            n_tx_descriptors   64
                 netif_debug   false
            no_sys_no_timers   true
                  pbuf_debug   false
              pbuf_link_hlen   16
                pbuf_options   true
           pbuf_pool_bufsize   1700
              pbuf_pool_size   256
              phy_link_speed   CONFIG_LINKSPEED_AUTODETECT
     socket_mode_thread_prio   2
               stats_options   true
                   sys_debug   false
                   tcp_debug   false
  tcp_ip_rx_checksum_offload   false
  tcp_ip_tx_checksum_offload   false
                  tcp_maxrtx   12
                     tcp_mss   1460
                 tcp_options   true
             tcp_queue_ooseq   1
     tcp_rx_checksum_offload   false
                 tcp_snd_buf   8192
               tcp_synmaxrtx   4
                     tcp_ttl   255
     tcp_tx_checksum_offload   false
                     tcp_wnd   2048
       temac_adapter_options   true
      temac_use_jumbo_frames   false
                   udp_debug   false
                 udp_options   true
                     udp_ttl   255
          use_axieth_on_zynq   1
        use_emaclite_on_zynq   1

xsct%

 

 

 

Share this post


Link to post
Share on other sites
  • 0

This is the console output

xsct% configbsp -bsp echo_bsp phy_link_speed CONFIG_LINKSPEED1000
CONFIG_LINKSPEED1000
xsct% configbsp -bsp echo_bsp -lib lwip141
========================================================================
                        NAME   VALUE
========================================================================
                    api_mode   RAW_API
                 arp_options   true
                arp_queueing   1
              arp_table_size   10
               debug_options   true
         dhcp_does_arp_check   true
                dhcp_options   true
                 emac_number   0
                  icmp_debug   false
                icmp_options   true
                    icmp_ttl   255
                  igmp_debug   false
                igmp_options   false
                    ip_debug   false
              ip_default_ttl   255
                  ip_forward   0
                     ip_frag   1
             ip_frag_max_mtu   1500
                  ip_options   0
          ip_reass_max_pbufs   128
               ip_reassembly   1
                  lwip_debug   false
                   lwip_dhcp   true
             lwip_ip_options   true
         lwip_memory_options   
                  lwip_stats   false
                    lwip_tcp   true
          lwip_tcp_keepalive   false
                    lwip_udp   true
                    mem_size   131072
                 memp_n_pbuf   16
          memp_n_sys_timeout   8
              memp_n_tcp_pcb   32
       memp_n_tcp_pcb_listen   8
              memp_n_tcp_seg   256
              memp_n_udp_pcb   4
            memp_num_api_msg   16
             memp_num_netbuf   8
            memp_num_netconn   16
          memp_num_tcpip_msg   64
               n_rx_coalesce   1
            n_rx_descriptors   64
               n_tx_coalesce   1
            n_tx_descriptors   64
                 netif_debug   false
            no_sys_no_timers   true
                  pbuf_debug   false
              pbuf_link_hlen   16
                pbuf_options   true
           pbuf_pool_bufsize   1700
              pbuf_pool_size   256
              phy_link_speed   CONFIG_LINKSPEED1000
     socket_mode_thread_prio   2
               stats_options   true
                   sys_debug   false
                   tcp_debug   false
  tcp_ip_rx_checksum_offload   false
  tcp_ip_tx_checksum_offload   false
                  tcp_maxrtx   12
                     tcp_mss   1460
                 tcp_options   true
             tcp_queue_ooseq   1
     tcp_rx_checksum_offload   false
                 tcp_snd_buf   8192
               tcp_synmaxrtx   4
                     tcp_ttl   255
     tcp_tx_checksum_offload   false
                     tcp_wnd   2048
       temac_adapter_options   true
      temac_use_jumbo_frames   false
                   udp_debug   false
                 udp_options   true
                     udp_ttl   255
          use_axieth_on_zynq   1
        use_emaclite_on_zynq   1

xsct% regenbsp -bsp echo_bsp
hsi::generate_bsp: Time (s): cpu = 00:00:00.37 ; elapsed = 00:00:06 . Memory (MB): peak = 778.035 ; gain = 0.000 ; free physical = 341 ; free virtual = 3091
xsct% Info: tcfchan#1 closed
xsdb% Info: ARM Cortex-A9 MPCore #0 (target 2) Stopped at 0x1032b0 (Suspended)
Info: ARM Cortex-A9 MPCore #0 (target 2) Stopped at 0x0 (Vector Catch)

Downloading Program -- /home/jojo/Xilinx/XilinxProjects/Current/ZYBO_Server/ZYBO_Server.sdk/echo/Debug/echo.elf
    section, .text: 0x00100000 - 0x00114f8b
    section, .init: 0x00114f8c - 0x00114fa3
    section, .fini: 0x00114fa4 - 0x00114fbb
    section, .rodata: 0x00114fbc - 0x0011591f
    section, .data: 0x00115920 - 0x00116817
    section, .eh_frame: 0x00116818 - 0x0011681b
    section, .mmu_tbl: 0x00118000 - 0x0011bfff
    section, .init_array: 0x0011c000 - 0x0011c003
    section, .fini_array: 0x0011c004 - 0x0011c007
    section, .bss: 0x00200000 - 0x0040811b
    section, .heap: 0x0040811c - 0x0041211f
    section, .stack: 0x00412120 - 0x0041d91f

  0%    0MB   0.0MB/s  ??:?? ETA
100%    0MB   0.5MB/s  00:00    
Setting PC to Program Start Address 0x00100000
Successfully downloaded /home/jojo/Xilinx/XilinxProjects/Current/ZYBO_Server/ZYBO_Server.sdk/echo/Debug/echo.elf
Info: ARM Cortex-A9 MPCore #0 (target 2) Running

 

When I try launching it, I get this error:

Description    Resource    Path    Location    Type
fatal error: lwip/err.h: No such file or directory    echo.c    /echo/src    line 36    C/C++ Problem

 

Share this post


Link to post
Share on other sites
  • 0

Well, err.h is part of the lwip library. I don't know how it can go missing. Have you tried regenerating the bsp? Is lwip correctly included in the bsp? I just ran the echo example on a zybo (2017.1) and I had no issues other than the CONFIG_LINKSPEED1000 parameter. I can send you the project if you want and you can compare it with yours.

Sergiu

Share this post


Link to post
Share on other sites
  • 0

 

@Sergiu

I don't understand why, but when I opened up the project today, the library was there. I ended up getting it working after all.

As feedback, your suggestion about the the Zybo possibly not being compatible with Xilinx's lwip and manually configuring it is what made the difference. You should put it in the tutorial to save people the frustration I went through.

Thank you.

ServerDemo.png

Share this post


Link to post
Share on other sites
  • 0

Well I'm glad to see that you got it going. Indeed that workaround should be included somewhere.

Have a good day,

Sergiu

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now