Laboratories

Below is a listing of each class laboratory. Documents may be widthheld before the lab is scheduled to start and will be added as necessary.

Each project has an associated lab document and STM32CubeIDE template project. To import these projects into STM32CubeIDE, download the template package and follow the Import Instructions. Prior to working on these projects, ensure that stm32lib.zip has been extracted within your STM32CubeIDE workspace. This package is used by each provided template.

All generated code and a report is required to be submitted for each lab. Requirements and rubrics are given here: Reports.

Lab 1

Construction of an ANSI terminal interfaces is learned as well as basic digital General Purpose Input/Output (GPIO) use.

Lab 2

Short refresh of the use of Interrupts and Timers and the intricacies of setup and use on STM32.

Lab 3

Serial communication methods. Focus on UART and SPI standards

Lab 4

Analog voltage interaction paired with DSP functionality. Both Analog-to-Digital Converters (ADC) and Digital-to-Analog Converters (DAC) will be used.

Lab 5

Direct Memory Access (DMA) peripheral introduction and use with serial communication (SPI), and ADC/DAC modules.

Lab 6 RTOS (Option 1)

An introduction to Real Time Operating Systems (RTOS) using FreeRTOS.

Lab 6 JPEG (Option 2)

Hardware JPEG decoding of image stored on SD Card and use of DMA2D peripheral.

Lab 6 USB (Option 3)

Universial Serial Bus (USB) applications, host configuration only.

Reports

Each laboratory requires that a report be submitted summarizing the effort. The objective of the Laboratory Reports is to have a thorough documentation of what was done, how it was done, and what was learned.

Grading

The report itself will be graded on a 20 point scale. The point values for each section are provided in Format.

The submitted code will be graded on a 10 point scale. The breakdown of these points is listed in the section Code.

The 30 points combined between the report and code submissions will be scaled to 50 points, which when combined with the task values results in a total lab grade of 100 points.

The report will be graded mainly on the technical content presented and the quality of presentation. There is no requirement on report length; however, the report should be of sufficient length to properly discuss each section. Repetitive text used in order to fill space is highly discouraged and may be penalized. Full score for each section will be awarded if:

  1. The topic is sufficiently discussed. No vital information is omitted from the text.

  2. Figures and/or Tables are used in place of descriptive text in order to increase understanding of the topic. Note that this material may alternatively placed in an appendix at the end of the report and referenced in the section of interest.

  3. Grammar and spelling are acceptable (not necessarily perfect).

  4. No factual errors are presented.

Format

The following provides a guideline for each section that should exist within the report and contents. Font and line spacing are not specified, but should be selected in order to produce a professionally styled report. In general, reports should be concise and use tables, figures, etc. in place of “long-winded” text descriptions when possible.

  1. Checkoff Sheet: Your laboratory checkoff sheet should be the first page of your report.

  2. Task # (15 pnts): Format your report as: Task 1, (a), (b), (c), Task 2 (a), (b), (c), etc. Do not combine sections for different tasks unless otherwise approved by the instructor. With tasks not combined, please reference other sections as necessary instead of repeating information.

    1. Introduction and High-Level Description: Write a high-level description what the tasks were and the solutions to them. In describing the firmware, include flow charts, state diagrams, or outlines to complement the description. Any built circuits should be supported by schematics or a table of connections. Use these elements flowchart and schematic to describe your solution. This section should be brief; approaching one page of writing for more complicated tasks (not including figures).

    2. Low Level Description: Write a low-level description of how your code and hardware works. Describe in detail all important concepts needed to implement the project (for example, what registers and peripherals did you use and why?) and how you used them to implement your project. If you have already discussed a concept in a previous task section of the report, you may cite that section, e.g.: “As discussed in Section X.”

    3. Results and Analysis: Discuss what the outcome of your project was. Present and discuss screenshots, data, tables, etc. which demonstrate the verification and/or outcome of the task. If you need to, discuss why your final result was different from your initial goal. Discuss issues that were encountered, what the issue was, and how it was solved or avoided.

  3. Conclusions (2 pnts): A short discussion on what was learned throughout the lab. List and discuss at least one real-world application of the material learned in this lab.

  4. References (0 pnts): List any sources of information you referred to in the report. Not citing material within the report will result in loss of points within that specific section. List all references in IEEE format. See below in “Notes on Formatting” for details.

  5. Formatting (3 pnts): You will be graded based on the format and clarity of your figures, tables, and references. Make sure to read the instructions on the following page to properly format your report.

Notes on Formatting

  1. Figures and Tables:

    • Label and caption all figures as exemplified in Figure 1.


    _images/ex_figure.png

    • Label and caption all tables as exemplified in Table 1.


    _images/ex_table.png

    • All figures and tables should be discussed and referenced within the text by their number (as shown in the previous items).

    • Flowcharts, plots, and schematics are figures and must be labeled and captioned.

    • Any text within a figure (excluding photos) must be legible.

  2. Schematics:

    • Schematics should be generated using appropriate circuit drawing software, such as KiCAD, LTspice, PSpice, Altium, etc. or very carefully drawn using other software.

    • Label pin numbers on any devices being used. Unused pins may be omitted if not pertinent.

    • All schematics should be easy to follow.

  3. Plots:

    • Show and label all plot axes, with units!

    • Always discuss what the plot is presenting within the text.

  4. References:

    • Format all references in IEEE format. Instructions are here on how to create IEEE references. If using word, you can automatically format references (go to Reference → Insert Citation). If using LaTeX, use the cite() function with the appropriate BibTeX style.

    • All references must be referenced in the body of the report and numbered. For example, “We found the table of escape sequence in [1].” Where [1] is the number of the relevant reference.

    • References should be numbered in the order they appear in the text. The first references is [1], the second is [2], and so on.

    • Note that the data provided in Table 1 should have a citation!

Code

Groups must submit all generated code to received credit for the laboratories. The submitted code should be professionally written and commented thoroughly. The rubric for grading the code is given below:

  1. Documentation and Comments (4 pnts):

    • Excellent (4): Code is thoroughly commented such that each operation can be interpreted clearly. Variable and function names are helpful in understanding the code.

    • Good (2): Code is reasonably commented, but some operations in the program are ambiguous and not described.

    • Poor (0): Little-to-no comments are given.

  2. Code Arrangement and Flow (4 pnts):

    • Excellent (4): Code is written in a logical manner, with large functions broken up into smaller functions with related operations grouped together.

    • Good (2): Operations in the code generally follow a logical flow but is broken up by some commands that are out of place. Functions may be unnecessarily large.

    • Poor (0): Code is very hard to follow even with commenting due to seemingly arbitrary placement of commands. Exceedingly large functions.

  3. Efficiency (2 pnts):

    • Excellent (2): Code is written without using unnecessary commands and interrupts are employed properly.

    • Good (1): Code is generally efficient but some commands issued are unnecessary. Interrupts are employed properly.

    • Poor (0): Code is inefficient, with many of the given operations being unnecessary. Interrupts not used properly.

Code should be submitted such that each tasks applicable code is clearly delineated. It is suggested that each task be developed in separate files; however, other mechanisms are allowed.

Any modified code files for the laboratory must be submitted.

Do not submit extraneous files.