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
Path II Programmable
  • Challenges & Projects
  • Design Challenges
  • Path II Programmable
  • More
  • Cancel
Path II Programmable
Blog PIIP - SW Training all done!
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: aspork42
  • Date Created: 9 Nov 2019 10:06 PM Date Created
  • Views 441 views
  • Likes 4 likes
  • Comments 0 comments
  • path ii programmable
  • xilinx
  • fpga
  • fsbl
  • mpsoc
Related
Recommended

PIIP - SW Training all done!

aspork42
aspork42
9 Nov 2019

In this series, we are provided an Ultra96 board and a series of training modules focused around three areas - Hardware (the FPGA side), Software (the microprocessor side), and Petalinux (the OS side).

 

In this blog post, I'll outline the Software lessons 6 through 12. There was a lot covered, so I'll be brief.

 

Lab 06 - First Stage Bootloader

In this lab, we create the First Stage Bootloader (FSBL). This is needed as a first step to running our application as stand-alone on the Ultra96 as stand-alone, instead of launching over JTAG. We learned a lot about the boot sequence inside of the MPSoC, which suppots many nice features such as secure booting, and booting from a selection of devices such as JTAG, QSPI, NAND, SD, and eMMC.

For the lab, all we really had to do was create a new 'project template' and choose First Stage Bootloader from within SDK. Then SDK takes care of the rest for us and builds it.

image

 

We also had to create a PMU file - Platform Management Unit - to run after the FSBL and before our application. This was done in a similar manner as above where we add a new 'application project' and change the processor dropdown to "psu_pmu_0".

 

From the lab, we learn what the PMU is responsible for:

The PMU performs the following set of tasks.

• Initialization of the system prior to boot.

• Power management.

• Software test library execution (optional).

• System error handling.

image

 

image

 

 

 

Lab 07 - SD Card boot up

In this lab, we take the FSBL and PMU along with our bitstream and our application and create a .bin file. This gets loaded on the SD Card, and we are finally able to put that in the Ultra96, power it up, and it will start on its own and run the program. This means that it can now run 'untethered' from the computer. The .bin file is the boot image. We tell the Ultra96 to boot from SD via the DIP switch on the board and it finds the .bin file and executes it.

 

We also change the build version from "debug" to "release". This does cause an issue with one of the interrupt tests as myself and others noticed. Charles Mao outlined in this blog post, there is an issue with how the test was coded, and how the SDK interprets the debug levels differently from Debug to Release.

image

 

The Ultra96 has an integrated cooling fan, and it is software controlled. This means that it can sometimes turn off, and that definitely happens during this test. The sad thing is that the coding issue causes the application to hang, and fan has turned off. The result is that the board heats up considerably while I am troubleshooting.

 

Temperature Alarm(0) HIGH Threshold is 52.700 Centigrade.

Temperature Alarm(0) LOW Threshold is 42.698 Centigrade.

VCCINT Alarm(1) HIGH Threshold is 0.637 Volts.

VCCINT Alarm(1) LOW Threshold is 1.037 Volts.

VCCAUX Alarm(3) HIGH Threshold is 1.597 Volts.

VCCAUX Alarm(3) LOW Threshold is 1.997 Volts.


Alarm 0 - Temperature alarm has occured


The Current Temperature is 63.075 Centigrade.

The Maximum Temperature is 63.658 Centigrade.

The Minimum Temperature is 62.516 Centigrade.

 

But other than that, this lab went well.

 

Lab 08 - Importing and exporting

In this lab, we discuss how to import and export hardware and settings. Most is done via File-->Export and File --> Import.

We learn that we can't simply copy and paste the directories because things won't build properly.

We are able to export our system debugger settings, breakpoints, and software repositories including drivers and libraries and custom BSPs.

image

 

Lab 09 - Interrupts and Exceptions

Here we learn about how interrupts are handled on the MPSoC. There are hardware (physical) interrupts and software interrupts, commonly called exceptions.

When an interrupt happens, there is a specific sequence of events which must happen to cleanly handle the interrupt.

Here is a rough outline:

  1. Finish execution of current process
  2. Store processor status into memory
  3. Disable interrupts (so we don't get additional interrupts during the handling of the first one)
    1. (I wish I could disable the interruptions to my interruptions at work...)
  4. Switch over to the ISR (interrupt Service Routine) and handle the interrupt
  5. Re-enable interrupts
  6. Re-load program variables from step 2
  7. Pick up regular program execution from where we left off in step 1.

 

For lots of reasons, ISRs should be kept short and sweet. If we want to print something out to a serial port when an interrupt happens, it would be best to just set a flag in the ISR, then let the regular program write it out in its own time.

 

In the lab, we use the LCD Dimmer application that we started with in the Software labs. We actually create it from scratch in this lab, but the program ends up being the same. We start with a program that doesn't have the interrupt, then we manually add it to the code.

 

I noticed that there was an incorrect screenshot in this lesson, which I think was a hold-over from the MiniZed training course that this training seems based on.

image

 

The screenshot shows the "LED Dimmer" application instead of "LCD Dimmer". That was definitely the app we created for the MiniZed since we didn't have any expansion cards for it.

 

Lab 10 - File System

In this lab, we learn about the Xilinx included libraries; and specifically about the xilffs - Xilinx FAT file system library. We read in temeprature values and write them out to a CSV file on the SD Card.

 

image

 

The CSV file ended up very messy. It looks like the \r\n (carriage return / new line) don't work properly in the code, and somehow I got a lot of zeros instead of actual readings.

image

 

 

 

Lab 11 - Click Mezzanine board

We create a simple application using the LSM6DSL Click Board. The lab has us set up a SPI slave device (the Click Board) and we read in the temperature values and print them on the serial console.

There is a pretty good introduction to the MikroBUS architecture and the availability of boards. It certainly looks like they have their own ecosystem of expansion boards; although there would need to be a good use case for something like an accelerometer or LCD click board on a $250 MPSoC / FPGA development board when a $35 Arduino interface with these sensors just as easily. Now obviously the Atmel 328 is nothing compared to the Xilinx ZU3EG... I suppose that for someone getting into electronics could start with an Arduino, and later on step up into the big leagues with an FPGA trainer board and this simplifies a lot of the work of physically interfacing. And also, the click boards certainly aren't exclusive to the Ultra96 - they have mezzanines for things like the Beagle Bone, RaspberyPi, and the humble Arduino.

 

Video walkthrough

See the video below for a walkthrough of these lessons.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

image

"I can haz clickboard" or "don't tell me about your watchdog timer"

 

And with that, I'm on to the Petalinux lessons. Hopefully I can get them done quickly before the end!

  • Sign in to reply
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