Electrical Design Lab

Auburn University | Fall 2023

Dr. John Hung

Lab 4: Interrupt Driven Operations in C

Previous labs worked with simple input/output (I/O) devices using program-controlled I/O, i.e. the programs continually monitored each external device (button) to determine when to take action. In this week's lab, teams learn how to design C programs for the STM32L4xx microcontroller to handle devices in interrupt-driven I/O mode. This allows the CPU to perform tasks other than monitoring external devices; these devices will signal the CPU via interrupt request signals when they require attention. Interrupt-driven I/O is used heavily in embedded system applications, with interrupt signals coming from external devices, data acquisition hardware, timers, etc. For this introductory lab, two external devices (switches) issue interrupt requests. The application program will comprise a main task that runs continuously, and two interrupt service routines that are only executed when interrupt requests are detected.

Lab 04 Progress
Lab 03 Progress

Lab 3: General Purpose I/O In C

In this laboratory session, students review processes for creating, executing and debugging application programs, written in the C language, for the ST Microelectronics ultra-low-power STM32L432KCU6 microcontroller, using the Keil Microcomputer Development Kit for ARM Processors (MDK-ARM). Each student designs a C program, containing a "main" program and two subroutines, to exercise various general purpose I/O (GPIO) ports and elements of the microcontroller. In the lab, students explore several debug support elements of MDK-ARM (uVision5), to be better prepared for debugging larger projects later in the semester.

Lab 2: Debugging with Oscilloscope and Logic Analyzer

Students should continue to gain experience with designing and testing microcontroller-based systems, and become familiar with debug tools, including the use of an oscilloscope and logic analyzer for microcontroller system analysis and debugging. Throughout the development and debugging of a microcontroller-based system, various signals sent to and from the microcontroller are examined to verify correct data patterns, control signal sequencing, timing, etc.

Lab 2 Progress
Lab 1 Progress

Lab 1: Project Creation and Debugging

The objective of this initial laboratory session is to become familiar with the process for creating, executing and debugging embedded system design projects on the ST Microelectronics STM32 Nucleo-L432KC board, using the µVision5 integrated development environment of the Keil Microcomputer Development Kit for ARM (MDK-ARM) and the Digilent Analog Discovery Studio (hereafter simply called "Studio"). In this session, a sample project is to be created and tested, with the program written in the C language. This lab demonstrates the basic setup of a computer system design project, as well as the process for transferring a program to the microcontroller on the Discovery board, executing the program, and debugging it.