This hands-on course builds upon basic embedded systems knowledge from ECE 306 to teach how to use the concurrent operation of the CPU and peripherals to create cost-effective embedded systems in several application spaces. This course gives an early introduction to practical multitasking on the CPU. Concurrency and synchronization are introduced with embedded system focus, revealing the interactions of peripherals, threads, interrupts, and the scheduler (RTOS or cooperative). We refine the scheduler incrementally to improve responsiveness and software modularity.
The development platform hardware is the NXP FRDM-KL25Z MCU board with a 48 MHz ARM Cortex-M0+ CPU core and a custom expansion shield with debug signal connectors, touch-sensitive full color 320x240 LCD, speaker, microSD socket, and asynchronous buck converter driver for high-brightness LED. Software used includes Keil MDK-ARM and the Keil RTXv5 RTOS.
To monitor signals and evaluate performance, each student purchases and uses an Digilent Analog Discovery tool as an oscilloscope, logic analyzer, protocol decoder and voltmeter. The shield plugs directly into the AD2 for reliability and convenience.
We use my Embedded Systems Fundamentals textbook (KL25Z edition, source code repository) in this course to help come up to speed quickly on the CPU core, interrupts and the MCU peripherals. The course then builds on this material to cover the bigger-picture issues.
Preparation
If you are interested in getting a head start on the course, please get and read the Embedded Systems Fundamentals textbook (KL25Z edition). Even better, get an NXP FRDM-KL25Z MCU board, install the tools, and try out the code examples from the source code repository.
If you are not familiar with how to use an oscilloscope or logic analyzer, you should try to come up to speed on it to understand how to analyze multiple single-bit digital signals and analog signals. You should understand how to configure triggering and sampling rate to detect certain signal events, and then interpret the displayed traces to determine time durations and delays between signals. It is also helpful to understand how the sampling rate can cause aliasing, how to detect it, and how to avoid or prevent it. This Digilent blog post explains triggering nicely.
Overview of Course Content
There are two types of homework assignments:
The Shields Up! project introduces students to dependable embedded system concepts.
This hands-on course covers the analysis and optimization of four different embedded system characteristics: code speed (task execution time), system responsiveness, power and energy use, and memory requirements. The quantitative and pragmatic approach of measure, modify, and measure again is used.
The development platform hardware is the NXP FRDM-KL25Z MCU board with a 48 MHz ARM Cortex-M0+ CPU core and a custom expansion shield with debug signal connectors, touch-sensitive full color 320x240 LCD, speaker, microSD socket, and asynchronous buck converter driver for high-brightness LED. Software used includes Keil MDK-ARM and the Keil RTXv5 RTOS. To monitor signals and evaluate performance, each student purchases and uses the Digilent Analog Discovery/Waveforms tool as an oscilloscope, power analyzer, logic analyzer, timing analyzer, protocol decoder and voltmeter.
Preparation
Students are expected to have completed the prerequisite ECE 460/560 course, though exceptions are made on a case-by-case basis. Please read this prerequisite explanation page to understand what you are expected to know.
Overview of Course Content
Examining Object Code without Getting Lost
Arm Cortex-M ISA
Software build and reverse engineering toolchains
Representing program characteristics with graphs: function calls, control flow, data flow
Speed Analysis and Optimization
Profiling with PC sampling,
Toolchain tuning,
Code optimization
Fixed-point math, polynomial approximations
Responsiveness Analysis and Optimization
It's all about the concurrency (Bare-metal and RTOS platforms)
Embedded System = processes X interactions = [software, hardware] X [synchronization, communication]
Real-time modeling methods
Response time and schedulability analysis
Power and Energy Analysis and Optimization
Power and energy modeling and analysis
MCU sleep modes, clock gating, frequency scaling
Memory Size Analysis and Optimization
Map file analysis
Toolchain tuning
Code optimization
Students to use a Linux-based Raspberry Pi (3, 4, (5?)) to learn embedded system concepts and interface with analog, digital, and serial devices. Students learn how to measure, analyze and optimize the raw code speed for a high-performance CPU running Linux using the compiler and C-language extensions for Advanced SIMD processing. Concepts in for real-time systems, and power or energy optimization are also covered.
ECE 561 is normally a pre/co-requisite for two reasons:
The Speed module in ECE 785 builds on the first two modules of ECE 561 (Examining Object Code without Getting Lost, Speed Analysis and Optimization).
Students evaluate system timing behavior using test equipment such as a mixed-signal oscilloscope and logic analyzer (typically with Digilent's Analog Discovery/Waveforms tools). ECE 460/560 and 461/561 teach students how to use these devices.
The instructor may waive this requirement for students with appropriate background or those willing to take the extra time to come up to speed in these areas with little supervision.
Overview of Course Content
Embedded Linux
Fundamentals
It's all about the concurrency (OS platform)
Embedded System = processes X interactions = [software, hardware] X [synchronization, communication]
Multithreaded and multiprocessing programming
Device interfacing
Seeking real-time performance
Power and energy optimizations
Speed Analysis and Optimization
Speed Analysis
Profiling
Object code analysis
Speed Optimization
Did the compiler do a good enough job?
Toolchain tuning
Source code tuning
Algorithm improvements
Neon and Advanced SIMD Programming
Compiler vectorization, and enabling more
Coding with Arm C-Language Extensions for Neon