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
  • 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 MicroZed - Standalone - PS UART Baud Rate
  • 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 Verified Answer
  • Replies 3 replies
  • Subscribers 342 subscribers
  • Views 1066 views
  • Users 0 members are here
Related

MicroZed - Standalone - PS UART Baud Rate

twv
twv over 9 years ago

Having trouble getting standalone template "Hello World" to work. Symptoms look like bad baud rate by surprising programming of baud rate generator.

I can see the MicroZed built-in Linux boot messages on the USB serial port in PuTTY at 115200 baud. I configured my own ps7_system in Vivado IPI based on the provided MicroZed_PS_properties_v03.tcl, but after applying them tweaked some clock frequencies in the block configuration GUI, such that the clock going to the PS UART baud rate generator was 75MHz instead of the original 50. The various resulting .h files included constants of 74999999 which I took to mean it understood. But I couldn't get "Hello World" to show up ungarbled on the terminal until I used mrd commands to read the slcr and uart control registers and saw that although 75MHz was going the baud rate generators, the generators themselves were programmed as though 50MHz was going in. Confirmed by boosting the baud rate in PuTTY to 172.8K.

What went wrong? I exported my Vivado design (bd plus fabric) to SDK after generating a bitstream (which I included). The contents of xparameters.h looked right.

1. I found the C source code in the library to set the UART's baud rate, but can't find where it gets called.

2. I now see the baud rate generator also gets programmed, to 115.2K, in ps7_init.c (which I've already overwritten with a new version where I changed the input clock to the uart back down to 50MHz). Could this have been the source of the erroneous baud rate? So the default application never sets the baud rate?

And now, I've regenerated the bitstream and ps7_* files, the bsp, and the helloworld.c application. And I get nothing on the serial port (but the residual Linux boot in the QSPI that I've not overwritten yet still works!).

Any ideas?

twv@

  • Sign in to reply
  • Cancel
  • jafoste4
    0 jafoste4 over 9 years ago

    Hi twv,

    You might find this thread helpful:

    https://forums.xilinx.com/t5/Zynq-All-Programmable-SoC/Set-UART-baudrate-to-921600-bps/td-p/497968

    --Josh

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • twv
    0 twv over 8 years ago

    Summary: Vivado and SDK prior to and including the 2016 series do not recalculate the initial values written to the baud rate generator when you in the IPI "configure block" GUI change the frequency of the clock to the UART. I assumed it did. Turns out the code that generates ps7_init constants assumes a 50MHz clock to the UART. Although I didn't care when I tweaked-up my IOPLL frequency to get the fabric frequencies I wanted, I now went back and could still turn the UART clock back to 50MHz (without breaking my fabric). I think I alternatively could have explicitly set the baud rate at run time, rather than rely on ps7_init. Hopefully, this will be corrected in a future version of Vivado/SDK.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • jafoste4
    0 jafoste4 over 8 years ago

    Hello twv,

    Thank you for posting your solution! I am sure it will help others in the future.

    --Josh

    • 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