element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • 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
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • 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 & Tria Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
MicroZed Hardware Design Finicky GPIO on MIO
  • 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 8 replies
  • Subscribers 362 subscribers
  • Views 1291 views
  • Users 0 members are here
Related

Finicky GPIO on MIO

Former Member
Former Member over 10 years ago

I am seeing strange behavior when I try to toggle a GPIO output on a MIO pin. The pin will toggle while in a debug session, but when the Zynq is configured by QSPI flash there is no pin response. The flash was programmed both by Impact and also through the SDK with the same result.

I configured the GPIO over MIO through Vivado and am using this blog post as a guide: http://forums.xilinx.com/t5/Xcell-Daily-Blog/Driving-the-Zynq-SoC-s-GPIO-Adam-Taylor-s-MicroZed-Chronicles/ba-p/389611

I am using MIO pin 12.

Any ideas?

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

    There is no obvious reason I can think of as to why GPIO would work in a debug session and not running when loaded from QSPI Flash.

     

    I would suggest first making sure that you have really successfully programmed you program into the QSPI Flash, perhaps using a 'Print' function to give an indication on the terminal that the program is actually running.

     

    The other difference may be one of timing. The nature of a debug session is that you can single step and even 'running' is slower. Perhaps add some delay in your program after toggling the pin to make sure you can observe the signal.

     

    -Gary

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

    Thanks, Gary.

    I am adding the GPIO to an existing application with Ethernet. I have interrogated the board through a test app to confirm the rest of the program is running correctly after being configured by the flash.

    I will play with the timing and report back.

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

    The code now sets the GPIO line low and leaves it there. The board responds the same way. In debug, the line is low and through flash it is stuck high. The GPIO pullup is disabled through Vivado.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • zedhed
    0 zedhed over 10 years ago

    Hi cobra18t,

    I have seen similar problems (but different than GPIO) with behavior when booting from flash that differ from the behavior when debugging.

    In each case, I was able to trace it back to my FSBL code (which is used to build the flash boot.mcs image file) was not updated with my new PS configuration.

    Since SDK uses the ps7_init.tcl file to initialize your Processing System each time a debug session is launched, perhaps this is also the case for you?

    Perhaps this is not the case for you, but it would be worth while to double check and make sure that you are using an FSBL which contains the ps7_init.c/ps7_init.h files that configure the MIO for the GPIO mode that you are trying to use.

    Regards,

    -Kevin

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

    Good call, Kevin. The FSBL had not been updated.

    Unfortunately, updating it did not solve the problem. I still do not have control of the GPIO but this time the lines are always stuck low.

    -Thomas

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

    So the GPIO pins follow whatever pullup setting I have. With pullups disabled, the pins are stuck low. With pullups enabled, they are stuck high.

    Here is a GPIO drive code snippet:

    XGpioPs_SetDirectionPin(&Gpio, 12, 1);
    XGpioPs_SetOutputEnablePin(&Gpio, 12, 1);
    XGpioPs_WritePin(&Gpio, 12, 0x1);

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

    One of the lines (MIO13) has an external 10k pull up to the 3.3V rail. If it were configured as an input, it should go to ~3.3V. Instead, it goes to 0.048V with pullups disabled and 3.275V with pullups enabled. So I think it really is an output.

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

    We were editing an existing project and a link to the BSP from the FSBL was broken. In the process of troubleshooting, I also broke the C project. After replacing the C project and rebuilding the FSBL with the proper BSP, it works.

    So you were right, Kevin.

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