Hands-On Embedded Systems: A Progressive Lab Series From Microcontroller Foundations to SoC Protocol Mastery
Explore real-world embedded development through structured labs on Arm® Cortex®-M, General-Purpose Input/Output (GPIO), Universal Asynchronous Receiver/Transmitter (UART), Serial Peripheral Interface (SPI), Inter-Integrated Circuit (I²C), Direct Memory Access (DMA), and Arm TrustZone® technology.
This two-semester lab series guides students from the fundamentals of 32-bit microcontrollers to advanced System-on-Chip (SoC) communication protocols and performance features. The first semester builds a strong foundation in embedded systems through GPIO, timers, UART, interrupts, SysTick, and basic TrustZone technology concepts. The second semester advances into SPI and I²C communication protocols, Analog‑to‑Digital Converter (ADC)/Digital-to-Analog Converter (DAC) interfacing, DMA-based data transfers, and secure firmware design using TrustZone technology.
Each lab is carefully sequenced to reinforce theoretical concepts, encourage exploration of data sheets and technical reference manuals, and develop industry-relevant skills through hands-on experimentation, waveform validation, debugging, and modular code development.
Who Is This for?
This lab series is intended for undergraduate students who have completed introductory embedded systems coursework and want to gain practical, register-level mastery of 32-bit microcontrollers and SoC interfaces.
Hardware and Software Tools
- PIC32CM LS00 Curiosity Nano+ Touch Evaluation Kit (EV41C56A)
- Curiosity Nano Explorer (EV58G97A)
- MPLAB® X IDE
- MPLAB XC32 Compiler
- MPLAB Code Configurator (MCC)
- MPLAB Data Visualizer
- Logic analyzer (e.g., Saleae Logic®)
Beginner Level: Initial Semester
Focus: Arm Cortex-M23 architecture, memory model, GPIO, clock configuration, UART, interrupts, SysTick, DMA concepts, and TrustZone technology fundamentals.
Total Module Hours: Approximately 18 hours
Module 1: Arm® Cortex®-M23/Armv8-M Architecture
Duration: 8 hours
This module introduces the Arm Cortex-M23 processor architecture and the Armv8-M architecture profile. Topics include the data flow model, programmer’s model, register usage, memory organization, and the distinction between secure and non-secure execution.
Additional topics include the organization of code memory, Static Random-Access Memory (SRAM), peripheral memory and the System Control Space (SCS). The module also introduces DMA concepts, timer configuration for 1–2 ms intervals, interrupts, and the Nested Vectored Interrupt Controller (NVIC).
Module 2: GPIO, Clock, and UART Interfacing
Duration: 10 hours
This module focuses on essential microcontroller peripherals and register-level configuration. Topics include GPIO operating modes such as analog, digital, and alternate-function modes; the PIC32CM LSx clock system; oscillator and Phase‑Locked Loop (PLL) configuration; peripheral clocking; and UART communication concepts.
Additional coverage includes UART baud rate configuration, framing, synchronous and asynchronous operation, pin configuration, FIFOs, error handling and register-level peripheral setup.
| Lab | Title | Description |
|---|---|---|
| 1 | MPLAB X IDE Code Setup and Project Creation | Create a project, build and run code, debug applications, and learn useful IDE tips and best practices |
| 2 | Data Sheet Exploration and GPIO Basics | Explore the data sheet, understand pin mapping, identify I²C1 pins, and distinguish between analog and digital pin functions |
| 3 | LED Toggle With Software Delay | Implement LED toggling using busy-wait delays and understand the limitations of software-based timing |
| 4 | Clock System Configuration | Configure internal and external clock sources and observe the impact on SysTick and UART operation |
| 5 | LED Toggle With Timer Module | Use a hardware timer to generate precise timing for LED toggling |
| 6 | Switch Input via GPIO | Read switch input via GPIO, implement debouncing, and indicate system state through outputs |
| 7 | UART Polling Mode | Configure UART for transmit and receive operations using polling mode, including baud rate setup and echo functionality |
| 8 | UART Interrupt Mode | Implement interrupt-driven UART communication, transmit a string, and understand Interrupt Service Routine (ISR)-based I/O and NVIC basics |
| 9 | Timer Interrupt | Configure a timer interrupt to toggle an output at 500 ms intervals using a periodic ISR |
| 10 | SysTick | Use the SysTick timer to measure the execution time of an operation |
| 11 | Memory Map Exploration | Explore code memory, SRAM, peripheral memory, and System Control Space using the debugger |
| 12 | DMA Demonstration | Demonstrate basic DMA operation through memory-to-memory or peripheral-assisted data transfers |
| 13 | Cooperative Scheduler | Build a SysTick-driven cooperative scheduler to manage multiple tasks such as LED control, UART communication, and ADC sampling |
| 14 | Secure vs Non-Secure Zone Demo | Demonstrate secure and non-secure execution zones, access control, and security violation handling |
Outcomes
By the end of the initial semester, you will be able to confidently read data sheets and technical reference manuals, configure GPIO, clocks, UART and timers, and write interrupt-driven embedded applications.
Additional outcomes include understanding memory maps, using debugging tools effectively, performing basic DMA operations, and building a cooperative scheduler. These skills provide a strong foundation for advanced SoC communication, peripheral integration, and secure embedded system development.