Microcontrollers & Embedded Systems
Programming and interfacing microcontrollers for real products: design constraints and energy budgets, microcontroller architecture with the memory map, buses, flash wait states and clock tree, embedded C with memory-mapped registers, volatile and bit masks, the toolchain, linker script and start-up code, GPIO with pulls, drive modes and debouncing, ADCs, DACs and PWM with resolution, noise and averaging, timers with prescalers, input capture and output compare, interrupts, priorities, latency and safe data sharing, UART baud-rate error budgets and RS-485 buses, SPI modes and throughput, I²C pull-up sizing, transaction time and bus recovery, CAN arbitration and bit timing, USB classes and wireless link budgets, low-power design with sleep modes, race to sleep and battery-life estimates, and firmware architecture, testing, watchdogs, safe updates and secure boot, with runnable Python calculations and C listings throughout and a capstone that designs the firmware for a solar-powered traffic sensor.
ELE-315 Year 3 3 credits 12 lessons · 4 h 28 min ▶ Video lessons coming soon
Offered by HSM University · Electrical Engineering
This is the Canadian version of this course. See the American version.
What you'll learn
- Explain what distinguishes embedded systems, translate product requirements into energy, timing, cost, environmental and pin budgets, and estimate an energy budget from duty cycles.
- Describe microcontroller architecture, including the core, memory map, buses, flash wait states, clock tree and reset sequence, and configure clocks to meet speed and power targets.
- Write embedded C that manipulates memory-mapped registers with masks, shifts and volatile accesses, and explain the toolchain, linker script, startup code and memory budget.
- Configure GPIO pins as inputs and outputs with appropriate pulls, drive strengths and open-drain modes, size LED and switch circuits, and debounce mechanical inputs in software.
- Use ADCs, DACs and PWM to measure and generate analog quantities, calculate resolution, scaling and noise, and apply averaging and filtering to sampled signals.
- Configure timers and counters with prescalers and reload values, measure intervals and frequencies with input capture, generate waveforms with output compare, and manage counter wrap.
- Explain interrupt handling, priorities and nesting, calculate worst-case interrupt latency, write short handlers, and share data safely between interrupts and main code.
- Design UART links by choosing frame formats and baud divisors within the error budget, handle receive errors, buffering and flow control, and build reliable RS-485 buses.
- Interface peripherals over SPI and I²C, choose SPI modes and clock rates, size I²C pull-up resistors from bus capacitance and rise time, estimate transaction times and recover a stuck bus.
- Explain CAN arbitration, framing, error confinement and bit timing, USB enumeration and device classes, and the trade-offs among wireless links, including a basic link budget.
- Reduce the power of embedded systems with sleep modes, race to sleep, tickless operation and elimination of hidden currents, and estimate battery life from a power budget.
- Structure firmware with superloops, state machines or a real-time operating system, test it on the host and on hardware, and make it robust and secure with watchdogs, safe updates and secure boot.
Course content
12 lessons · 4 h 28 min total · final exam
- 1 Embedded systems and their design constraints 22 min · quiz
- 2 Microcontroller architecture: core, memory map, buses and clocks 20 min · quiz
- 3 Embedded C and the toolchain 21 min · quiz
- 4 GPIO and digital input and output 21 min · quiz
- 5 Analog input and output: ADC, DAC and PWM 20 min · quiz
- 6 Timers and counters 22 min · quiz
- 7 Interrupts, priorities and latency 22 min · quiz
- 8 Serial communication I: UART and RS-485 26 min · quiz
- 9 Serial communication II: SPI and I²C 26 min · quiz
- 10 CAN, USB and wireless links 22 min · quiz
- 11 Low-power design and power management 24 min · quiz
- 12 Firmware architecture, testing and security: a capstone 22 min · quiz
- E Final exam 20 questions
Requirements
Recommended background. You can start any course at any time.
Description
Programming and interfacing microcontrollers for real products: design constraints and energy budgets, microcontroller architecture with the memory map, buses, flash wait states and clock tree, embedded C with memory-mapped registers, volatile and bit masks, the toolchain, linker script and start-up code, GPIO with pulls, drive modes and debouncing, ADCs, DACs and PWM with resolution, noise and averaging, timers with prescalers, input capture and output compare, interrupts, priorities, latency and safe data sharing, UART baud-rate error budgets and RS-485 buses, SPI modes and throughput, I²C pull-up sizing, transaction time and bus recovery, CAN arbitration and bit timing, USB classes and wireless link budgets, low-power design with sleep modes, race to sleep and battery-life estimates, and firmware architecture, testing, watchdogs, safe updates and secure boot, with runnable Python calculations and C listings throughout and a capstone that designs the firmware for a solar-powered traffic sensor.
Part of the Engineering stream, typically taken in year 3.