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
    • Or 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 GPIO MIOs from linux kernel
  • 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 4 replies
  • Subscribers 176 subscribers
  • Views 270 views
  • Users 0 members are here
Related

GPIO MIOs from linux kernel

oscargomezf
oscargomezf over 7 years ago

Hi,

 

I would like to know how to access to GPIOs MIO from Linux kernel.

 

I'm not completely sure how to do that.

 

I can see in my picoZed in the /sys/class/gpio the folder gpiochip0 and inside this folder the file ngpio with a value of 64. But I not completely sure if this is the MIO GPIOs, because the MIO are 54 GPIOS:

MIO0 pins 0 to 15 -> connected to a 3.3Volts bank
MIO1 pins 16 to 53 -> connected to 1.8 Volts bank
 
Am I right or wrong?
 
Best regards.
  • Sign in to reply
  • Cancel
  • jafoste4
    0 jafoste4 over 7 years ago

    Hello Oscargomezf,

    Try looking at our PetaLinux for Zynq Speedway we offer. It doesn't specifically target PicoZed, but you should be able to take some of the information there and apply it to what you are trying to do.

    http://zedboard.org/course/petalinux-zynq%C2%AE-7000-all-programmable-soc

    --Josh

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

    Hi,

     

    I was reading the /proc/device-tree/amba/gpio@e000a000 with a width of 64 bits. And I've tried to configure de PS_MIO51 as an input to check the PS_PB button in the PicoZed FMC Carrier V2:

    $ echo 51 > export
    $ echo in > 51/direction
    $ cat 51/value
     
    And when I pressed that button I've got and 1 and when the button is released I've got a 0, So it's working fine. But If I only have 54 GPIOS (From 0 to 53) Whats happen with the GPIOS from 54 to 63? I think It has to be a width of width instead of 54 because it has to be a power of 2 and If you try to access to the pins from 54 to 63 nothing happens, but I'm not completely sure.
     
    Best regards.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • oscargomezf
    0 oscargomezf over 7 years ago in reply to oscargomezf

    Sorry, I made a typographic error, and I don't know how to modify this post:

    $ cd /sys/class/gpio
    $ echo 51 > export
    $ echo in > gpio51/direction
    $ cat gpio51/value
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • tylerduterrau
    0 tylerduterrau over 5 years ago

    thanks for this this is very use ful for me i wana like this

    • 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