element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Achievement Levels
    • Benefits of Membership
    • Feedback and Support
    • Members Area
    • Personal Blogs
    • What's New on element14
  • Learn
    Learn
    • eBooks
    • Learning Center
    • Learning Groups
    • STEM Academy
    • Webinars, Training and Events
  • Technologies
    Technologies
    • 3D Printing
    • Experts & Guidance
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Arduino Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Project Groups
    • Raspberry Pi Projects
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • 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
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Software Application Development Access GPIO from remote processor running FreeRTOS in OpenAMP design
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Avnet Boards Forums requires membership for participation - click to join
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 3 replies
  • Subscribers 174 subscribers
  • Views 1949 views
  • Users 0 members are here
Related

Access GPIO from remote processor running FreeRTOS in OpenAMP design

Former Member
Former Member over 7 years ago

Hello,
I've posted this same message to the Xilinx support forum, but thought I'd try here as well.

I have created an AMP configuration using a MicroZed board where the master processor is running PetaLinux and the remote processor is running FreeRTOS.  This design is based off the proxy_app example and successfully boots both processors and executes code on both processors that communicate using the mechanisms from the example.  In addition, I am able to control custom QSPI blocks instantiated within the PL section of the Zynq from the remote process and receive interrupts for these peripherals in the remote processor.

I need to be able to control several GPIOs from the remote processor and I am unable to do this.  I first started with GPIOs that are routed to EMIO, but had no luck.  I then went back to attempt to use the LED GPIO (on MIO47) on the MicroZed and that fails as well.  If I use the same code in a stand-alone project (non-AMP with FreeRTOS code running on processor 0), I can successfully control all the EMIOs, but porting that code to the AMP design does not allow any GPIO control.

Is there some initialization that must be done to allow access to the PS peripherals such as the GPIO or others to be accessed by the remote processor in this configuration?

All tools and Petalinux are version 2015.4. Thanks in advance for any help anyone can provide.

Regards,
Ron

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

    Hello Ron,

     

    There are a couple of posts on the Xilinx Community Forums that might address your issue:

     

    https://forums.xilinx.com/t5/OpenAMP/I-O-resource-on-cpu1/td-p/669122

     

    https://forums.xilinx.com/t5/Zynq-All-Programmable-SoC/AMP-spi-drivers-not-working-on-cpu1/td-p/642930

     

     

    Let us know if this resolves the issue.

     

    -Gary

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 7 years ago

    Thanks Gary.  The problem was that these GPIOs needed to have entries in the device tree.  I added one for the LED on MIO47 as follows:

    gpio-leds {
    tcompatible = "gpio-leds";
    tled-user47 {
    ttlabel = "led-user47";
    ttgpios = <&gpio0 47 0>;
    t};
    };

    And my custom GPIOs on EMIO:
    gpio {
    tadc-gpio0 {
    ttlabel = "adc-gpio0";
    ttgpios = <&gpio0 54 0>;
    t};
    tadc-gpio1 {
    ttlabel = "adc-gpio1";
    ttgpios = <&gpio0 55 0>;
    t};
    };

    Evidently these are needed on the PetaLinux side to enable them for the remote processor.  I'm guessing this enables clocks to the devices.

    -Ron

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • byc013
    0 byc013 over 2 years ago in reply to Former Member

    Hello Gary,

     

    I'm running an AMP system on Zynq7000 with two cortex A9 cores.

    Linux Os on core0 and standalone on core1.

     

    In my case I use remoteproc drivers to load the standalone ELF from Linux user-space based on the rpmsg-proxy-app sample application.

     

    I am trying to access gpios MIOs and EMIOs from my standalone application with no luck so far. I have tried many things.

    I also need to access SPI0 from the standalone app with no luck as well.

     

    I was trying to follow the 2 links you've provided here above but they seem to be broken.

     

    Could you please assist me with this IOMEM issue?

     

    Thanks!

    • 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 © 2023 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