element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Software Application Development Ethernet not working on FreeRTOS (Linux/FreeRTOS AMP)
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 1 reply
  • Subscribers 328 subscribers
  • Views 611 views
  • Users 0 members are here
Related

Ethernet not working on FreeRTOS (Linux/FreeRTOS AMP)

Former Member
Former Member over 11 years ago

petalinux 2014.2
freertos 1.00.b (AMP)
lwip140 ver 2.1
Zedboard rev C

I have setup Linux to run on core0 and FreeRTOS on core1.
Ethernet on eth0 works in Linux. It also work in FreeRTOS 1_02_a (not AMP) when FreeRTOS runs on core0 without Linux.

I start by booting up Linux with ethernet enabled, then use remoteproc to fire up FreeRTOS.

FreeRTOS configures lwip, but cannot detect PHY. Still, it continues and is able to autonegotiate speed. I can see that the LED on the port goes down, then up.

NOTE: I had to change:
#define PHY_DETECT_REG  1
to
#define PHY_DETECT_REG  0
to make the autonegotiate to work. Have no idea why.

The debug log from lwip is at the bottom.
At the end both FreeRTOS and Linux hangs. Well, FreeRTOS is probably waiting for a connection (ping), but Linux just hangs. Pinging does not work.

I have also tried to disable Ethernet before starting FreeRTOS. I tried:
ifconfig  eth0 down --> then start FreeRTOS
unbind ethernet driver --> then start FreeRTOS
remove eth from dts --> then start FreeRTOS
remove eth driver from kernel --> then start FreeRTOS

For all of the above FrreeRTOS cannot autonegotiate.


My question is: How can I make ethernet0 available to the FreeRTOS, but not to Linux?????




IP setup
netif_set_ipaddr: netif address being changed
netif: IP address of interface  set to 10.0.0.3
netif: netmask of interface  set to 255.255.255.0
netif: GW address of interface  set to 10.0.0.2
XEmacPs detect_phy: No PHY detected.  Assuming a PHY at address 0
Start PHY autonegotiation
Waiting for PHY to complete autonegotiation.
autonegotiation complete
link speed: 1000
RxRingPtr: 0x0002aa58
TxRingPtr: 0x0002aa14
rx_bdspace: 0x01100000
tx_bdspace: 0x01110000
netif: added interface te IP addr 10.0.0.3 netmask 255.255.255.0 gw 10.0.0.2
netif: setting default interface te
creating xemacif_input_thread
created xemacif_input_thread
tcpip_thread: API message 0xa30954
tcpip_thread: API message 0xa30954
tcp_bind: bind to port 7
tcpip_thread: API message 0xa3095c


  • Sign in to reply
  • Cancel
  • Former Member
    0 Former Member over 11 years ago

    My guess here is that each OS thinks it has control of the Ethernet, and the conflict is what is causing the problems you are seeing.  If you want to remove Linux access to Ethernet, then you should rebuild the kernel with Network access disabled.  Then FreeRTOS should be able to configure the network as it normally does.

    Ron

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube