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
      •  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
  • Settings
Path II Programmable
  • Challenges & Projects
  • Design Challenges
  • Path II Programmable
  • More
  • Cancel
Path II Programmable
Blog P2P: SW Lab 7 Road Block
  • 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: nerdyupdates
  • Date Created: 27 Oct 2019 8:27 PM Date Created
  • Views 731 views
  • Likes 4 likes
  • Comments 2 comments
  • ultra96-v2
  • path ii programmable
Related
Recommended

P2P: SW Lab 7 Road Block

nerdyupdates
nerdyupdates
27 Oct 2019

Creating an SD Boot Image

 

This lab was very straightforward, but I ran into an issue that left me scratching my head for a while.

 

This lab used the previously created "Test_Peripherals" application to build the SD card boot image. This test application ran with no issues in JTAG debug mode in lab 5.

 

I walked through the steps of creating the boot image, including adding the PMU firmware. Generated the BIN boot image and loaded it up on the Ultra96-V2 board. The terminal output indicated the program had hung up:

 

image

The test hung up on the "psu_csudma" interrupt example test. I figured, ok, maybe I did something wrong in the build. I walked through the steps again and had to do the following because my files no longer automatically showed up (probably because they were already allocated to the existing boot image):

image

I think the "Clean Project" step caused a second issue, as after a rebuild of the boot image, I no longer saw an output on the terminal. I went back and checked in the BSP, and sure enough, the UART for stdin/stdout showed psu_uart_0. I had set this to psu_uart_1 as instructed in Lab 6, and I know that to be the case, as I would not have seen the "psu_csudma" test hang up in the terminal to begin with. After fixing the BSP and another rebuild, still no luck on the interrupt test.

 

I went back into debug mode to make sure I hadn't accidentally modified a source file in a way that would cause this. In debug mode, the "Test_Peripherals" application ran with no issues (just as in Lab 5). The debug and release versions of the application use the same source, the only difference being some optimizations for the release version.

 

Now what? I decided to add debug print statements liberally in the "psu_csudma" interrupt example function. This function is named "XCsuDma_IntrExample" and is called from "testperiph.c". The function is found in "xcsudma_intr_example.c":

 

image

 

As you can see, I added print statements after pretty much any function call to see where the interrupt example function was ending up stuck:

image

 

I re-built yet again, and to my surprise, the "Test_Peripherals" application executed completely and did not hang! I saw the output from all my added print statements, but unfortunately didn't grab a screenshot. Why did print statements cause this function not to hang? I have no idea.

 

I re-built one more time without debug print statements, just to make sure I wasn't crazy. The interrupt example hung once again. Finally, I had to look into the solutions workspace provided for this lab to see if I was doing something wrong. I diffed files related to Test_Peripherals in both my workspace and the solutions workspace:

image

 

A-ha! The "testperiph.c" file in the solution workspace had this very test case commented out! I quickly went back through the lab and previous labs to make sure I hadn't missed something. There were instructions to comment out a UART test in the Test_Peripherals application, but I saw nothing about commenting out this test. Looks like the training creators probably saw this same issue, commented the "testperiph.c" file, but forgot to write about it. That or there is some good reason why the interrupt test doesn't work that they forgot to mention. Either way, I finally got to the bottom of it.

 

-Phil

  • Sign in to reply

Top Comments

  • cmelement14
    cmelement14 over 6 years ago +1
    I posted a solution to the problem you encountered here: Do Not Hide the Problem - A Correct SW Lab 7 Solution
Parents
  • cmelement14
    cmelement14 over 6 years ago

    I posted a solution to the problem you encountered here:

     

    Do Not Hide the Problem - A Correct SW Lab 7 Solution

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • cmelement14
    cmelement14 over 6 years ago

    I posted a solution to the problem you encountered here:

     

    Do Not Hide the Problem - A Correct SW Lab 7 Solution

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
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