Ground Embedded KO Subscribe

Notes

182 short notes, one per roadmap topic. 12 are available in English so far; the rest open in Korean.

Notes marked KR open in Korean. Your browser's built-in translation works well on those pages.

01 Foundations

C Language

12
  1. 01Variables and types: why we use uint8_tWhy we use fixed-width types such as uint8_t and int16_t instead of int, plus signedness and overflow.
  2. 02Operators and conversions: where bugs hideInteger division, implicit conversions and operator precedence: where bugs like to hide.
  3. 03Control flow: why firmware is an infinite loopBuilding flow with if, switch, for and while, and why firmware is an endless loop.
  4. 04Functions and scope: copies, lifetime, recursionPass-by-value, the lifetime of local and global variables, and why recursion is risky on an MCU.
  5. 05Arrays and strings: how buffer overflow happensContiguous data in memory, null-terminated strings, and how buffer overflows happen.
  6. 06Pointers: handle addresses and the registers appearA variable that holds an address. Reading and writing a specific address is all register control is.
  7. 07Advanced pointers and function pointersPointer arithmetic, double pointers, and function pointers for callbacks and state machines.
  8. 08Structs, unions and bit-fieldsDescribing register blocks and packets with structs, and checking alignment and padding.
  9. 09Bit operations: set, clear, toggleClear with AND, set with OR, toggle with XOR, move with shifts.
  10. 10volatile, const, staticvolatile blocks optimization, const fixes a value, static changes scope and lifetime.
  11. 11The preprocessor and macros#define, conditional compilation, header guards, and the traps macros set.
  12. 12The build process: from source to firmwarePreprocess, compile, assemble, link: how source becomes an executable, and how to read linker errors.

Data Structures & Algorithms

8
  1. 01Time and memory complexity KRWhy computation and memory use come first on a small MCU.
  2. 02Ring buffer KRA circular queue that keeps incoming UART data safe: the bridge between an interrupt and the main loop.
  3. 03Queues and stacks KRWhat a work queue and a call stack really are, implemented with arrays.
  4. 04Linked lists and memory pools KRUsing lists with a pre-allocated pool instead of dynamic allocation.
  5. 05State machines KROrganising complex sequences as states and transitions. The basic tool of firmware design.
  6. 06Search and lookup tables KRBinary search, and precomputed tables for functions such as sine.
  7. 07CRC and checksums KRWriting the calculation that tells you whether data was corrupted in transit.
  8. 08Fixed-point arithmetic KRQ formats: handling fractions with integers on an MCU without an FPU.

Digital Logic

8
  1. 01Binary, hex and two's complement KRReading register values in hex and how negative numbers are represented.
  2. 02Logic gates and Boolean algebra KRAND, OR, NOT, XOR, and simplifying expressions with De Morgan's laws.
  3. 03Combinational circuits KRDecoders, multiplexers, adders: outputs decided by inputs alone.
  4. 04Flip-flops and registers KRFlip-flops remember a value on each clock edge; a group of them is a register.
  5. 05Counters and shift registers KRThe circuits behind MCU timers and SPI.
  6. 06Clocks and timing KRSetup and hold time, propagation delay, and metastability from asynchronous signals.
  7. 07Logic levels and interfaces KR3.3 V and 5 V, push-pull and open-drain, and level shifting.
  8. 08A taste of FPGA KRDesigning hardware in code, and how that differs from an MCU.

Computer Architecture

10
  1. 01Von Neumann and Harvard KRWhether code and data travel the same path or separate ones.
  2. 02Inside the CPU KRRegisters, the ALU, the program counter, and the fetch-execute loop.
  3. 03Pipelines KROverlapping several instructions, and why branches are slow.
  4. 04Memory hierarchy KRRegisters, cache, SRAM, Flash: the faster, the smaller and costlier.
  5. 05Memory map KRCode in Flash, variables in SRAM. Everything in an MCU has an address.
  6. 06Buses and peripherals KRPeripheral registers live at memory addresses too. AHB, APB and memory-mapped I/O.
  7. 07Stack and heap KRThe stack that grows with every call, and why embedded code is wary of the heap.
  8. 08Interrupts and exceptions KRStop, save state, jump to a handler, and return.
  9. 09DMA KRHardware that moves data between memory and peripherals without the CPU.
  10. 10ARM Cortex-M overview KRM0, M3, M4, M7, and how MCU families such as STM32 are organised.

02 Hardware

Circuit Theory

10
  1. 01Voltage, current, resistance KRVoltage is a difference between two points. Start with ground and potential.
  2. 02Ohm's law and power KRV = IR, P = VI. Work out how hot a part will get.
  3. 03Kirchhoff's laws KRCurrent into a node equals current out; voltages around a loop sum to zero.
  4. 04Series, parallel, voltage dividers KRTwo resistors dividing a voltage. You meet it at every ADC input and sensor.
  5. 05Thevenin and Norton equivalents KRReducing a circuit to one source and one resistor to see output impedance.
  6. 06Superposition KRSolving a multi-source circuit one source at a time and adding the results.
  7. 07Capacitors and the RC time constant KRA capacitor resists sudden voltage change. τ = RC is the time to reach 63%.
  8. 08Inductors and RL circuits KRAn inductor resists sudden current change, and why the kick on turn-off is dangerous.
  9. 09AC and impedance KRResistance that depends on frequency. Calculating AC circuits with phasors.
  10. 10Filters and resonance KRThe RC low-pass cutoff 1/(2πRC), and LC resonance.

Electronic Circuits

12
  1. 01Semiconductors and the PN junction KRWhy current flows one way only: the principle shared by diodes and transistors.
  2. 02Types of diodes KRRectifier, Schottky, Zener, LED, TVS, and where each is used.
  3. 03BJT as a switch KRA small base current switches a large one. Calculating the base resistor.
  4. 04MOSFET as a switch KRGate voltage, on-resistance, logic-level MOSFETs: the standard way to switch a big load from an MCU.
  5. 05Gate drivers and the half bridge KRTwo MOSFETs stacked, and why the upper one needs a driver.
  6. 06Op-amp basics KRCalculating inverting and non-inverting amplifiers with the virtual short.
  7. 07Op-amp applications KRComparators, integrators, active filters, differential amplifiers.
  8. 08Current-sense circuits KRAmplifying a few millivolts across a shunt for the ADC.
  9. 09Linear regulators KRAn LDO is simple but runs hot. Dropout voltage and heat.
  10. 10Switching converters KRBuck and boost: efficient, but noisy, and why.
  11. 11ADC and DAC circuits KRResolution, reference voltage, sampling time, and the RC filter at the input.
  12. 12Protection circuits KRTVS diodes, fuses and reverse-polarity protection against ESD, reverse voltage and overcurrent.

Practical Components

8
  1. 01Choosing resistors KRPower rating, tolerance, temperature coefficient, and packages such as 0402 and 0603.
  2. 02Types of capacitors KRMLCC, electrolytic, tantalum, and the DC-bias trap that shrinks MLCC capacitance.
  3. 03Inductors and ferrite beads KRSaturation current, DCR, and beads that absorb noise.
  4. 04Crystals and oscillators KRThe source of the MCU clock. Load capacitors and placement.
  5. 05Connectors and terminals KRCurrent rating, pitch, locking: the most common point of failure in the field.
  6. 06Fuses and protection parts KRHow to choose polyfuses, TVS diodes and varistors.
  7. 07Pull-ups, pull-downs, decoupling KRResistors that hold a floating pin, and capacitors that steady the supply next to a chip.
  8. 08Reading a datasheet KRAbsolute maximum ratings, recommended conditions, electrical tables, timing diagrams.

PCB Design

8
  1. 01Drawing schematics KRKiCad symbols, net labels and hierarchical sheets for a readable schematic.
  2. 02Placement strategy KRSeparate power, high-speed and analog areas, and fix connector positions first.
  3. 03Trace width and current KRChoosing width from copper thickness and allowed temperature rise.
  4. 04Ground and power planes KRDesign ground by thinking about where return current flows.
  5. 05Decoupling placement KRCapacitors close to pins, vias short. Placement alone changes the noise.
  6. 06High-speed signals and impedance KRDifferential routing and impedance matching for USB and Ethernet.
  7. 07EMC basics KRHabits that keep a board from emitting or picking up noise.
  8. 08Gerbers and ordering KRDRC, Gerber and drill files, BOM and placement files for manufacturing.

Test & Debug Instruments

6
  1. 01Multimeter KRVoltage, current, resistance and continuity, and common mistakes when measuring current.
  2. 02Oscilloscope KRTrigger, timebase, probe compensation. Reading a circuit from its waveform.
  3. 03Logic analyzer KRDecoding UART, SPI and I2C to see the traffic itself.
  4. 04Bench supply and electronic load KRCurrent limit to protect a board, and a load to test the power stage.
  5. 05Debugger KRFlashing and single-stepping firmware with ST-LINK or J-Link.
  6. 06Soldering and rework KRSMD soldering, flux, and hot air for removing and fitting parts.

03 Firmware

Machine Code & Assembly

8
  1. 01What an instruction is KRMachine code is the numbers the CPU reads; assembly is the names for those numbers.
  2. 02Reading Thumb instructions KRMOV, LDR, STR, B and BL on ARM Cortex-M.
  3. 03Registers and calling convention KRArguments in r0 to r3, return address in lr, stack position in sp.
  4. 04C versus assembly KRDisassembling a small C function line by line and comparing optimization levels.
  5. 05Startup code KR.data is copied to RAM and .bss zeroed before main is called.
  6. 06Linker scripts and sections KRThe file that decides where .text, .data and .bss sit in Flash and RAM.
  7. 07Vector table KRThe table holding the initial stack value and the handler addresses.
  8. 08Hard-fault analysis KRFinding the failing line from the registers left on the stack.

MCU Firmware

12
  1. 01Development environment KRSet up STM32CubeIDE, a compiler and a debugger, and light one LED.
  2. 02Registers versus HAL KRDriving registers directly or through a HAL, and when to use which.
  3. 03GPIO KRInput and output, push-pull and open-drain, internal pull-ups, at register level.
  4. 04Clock tree KRHSE, PLL, prescalers: where the clock comes from and how it is divided.
  5. 05Timers KRPeriodic interrupts and measuring time with input capture.
  6. 06PWM KRGenerating PWM with a timer and calculating PSC, ARR and CCR.
  7. 07Interrupts and the NVIC KRPriorities, why handlers stay short, and shared variables.
  8. 08ADC KRSingle conversion, continuous conversion, and timer-triggered sampling.
  9. 09Using DMA KRMoving ADC values and UART data to memory without the CPU.
  10. 10Watchdog and low-power modes KRA watchdog that resets a hung program, and sleep modes for battery devices.
  11. 11Writing Flash and EEPROM KRKeeping settings across power cycles, and write-cycle limits.
  12. 12Bootloader KRHow firmware updates itself, and how memory is partitioned.

Communication Protocols

12
  1. 01Serial basics KRSynchronous and asynchronous, full and half duplex, single-ended and differential.
  2. 02UART KRCommunication at an agreed speed without a clock. Frame structure and baud-rate error.
  3. 03RS-232, RS-422, RS-485 KRVoltage levels and differential signalling that carry UART over distance.
  4. 04SPI KRExchanging data on a shared clock. Four modes and multiple slaves.
  5. 05I2C KRMany chips on two wires. Addresses, ACK and choosing pull-up resistors.
  6. 06CAN KRThe automotive bus where the lowest ID wins on two differential wires.
  7. 07CAN FD KRUp to 64 data bytes, with a faster data phase.
  8. 08LIN KRA low-cost vehicle network where one master polls in turn.
  9. 09USB basics KRDescriptors, endpoints, and a virtual serial port with CDC.
  10. 10Ethernet and TCP/IP KRMAC, PHY, IP, TCP: networking from an MCU.
  11. 11Wireless KRRange, speed and power of BLE, Wi-Fi and LoRa.
  12. 12Protocol design KRHeader, length, CRC, retransmission: writing your own rules.

RTOS

8
  1. 01Limits of the super loop KRThe delay and complexity of doing everything in one loop.
  2. 02Tasks and the scheduler KRSplitting work into tasks, and how the scheduler shares time.
  3. 03Priority and preemption KRUrgent tasks pushing less urgent ones aside.
  4. 04Semaphores and mutexes KRKeeping two tasks from touching a shared resource at once.
  5. 05Queues and event groups KRPassing data and signals between tasks safely.
  6. 06Priority inversion KRA low task blocking a high one, and priority inheritance.
  7. 07Memory and stack management KRSizing each task's stack and detecting overflow.
  8. 08FreeRTOS in practice KRSensor reading, communication and control as tasks on an STM32.

Firmware Design & Quality

8
  1. 01Layered architecture KRHAL, drivers, services, application, and the direction of dependencies.
  2. 02Modules and interfaces KRDrawing boundaries with headers and hiding the internals.
  3. 03Coding rules KRWhat MISRA C forbids, and why.
  4. 04Unit testing KRTesting firmware logic on a PC without hardware.
  5. 05Static analysis KRCompiler warnings and tools such as cppcheck that find bugs before running.
  6. 06Version control KRGit branches, commit granularity and release tags for firmware history.
  7. 07Logging and debug output KRprintf debugging, ring-buffer logs, real-time trace.
  8. 08Firmware updates KROTA structures that update devices in the field safely.

04 Applications

Control Engineering

10
  1. 01Open loop and closed loop KRFeedback means measuring the result and feeding it back into the input.
  2. 02System modelling KRDescribing motors, RC circuits and temperature as first- and second-order systems.
  3. 03Laplace transform and transfer functions KRTurning differential equations into multiplication and division.
  4. 04Block diagrams KRConnecting systems as blocks and reducing them.
  5. 05Time response KROvershoot, settling time, steady-state error: the common language of performance.
  6. 06PID control KRP reacts to present error, I to accumulated error, D to its rate of change.
  7. 07Stability KRWhy raising the gain leads to oscillation and divergence, seen through pole positions.
  8. 08Frequency response and Bode plots KRJudging stability with phase margin and gain margin.
  9. 09Digital control KRSampling period, discretization, and anti-windup against integrator saturation.
  10. 10A taste of state space KRThe starting point of modern control: handling several states at once.

Sensors & Signal Processing

8
  1. 01Sensor basics KRHow a physical quantity becomes a voltage or data, and reading sensor specs.
  2. 02Sampling and aliasing KRThe Nyquist frequency, and why you filter before sampling.
  3. 03Digital filters KRMoving average, IIR and FIR filters computed on an MCU.
  4. 04Kalman filter basics KRBlending prediction and measurement for a better estimate.
  5. 05IMU and sensor fusion KRA complementary filter that combines accelerometer and gyro into tilt.
  6. 06Encoders and Hall sensors KRSensing rotor position and speed, and the timer's encoder mode.
  7. 07Distance sensors KRUltrasonic, infrared, ToF and lidar: principles and limits.
  8. 08Seeing frequency with the FFT KRFinding where vibration and noise are concentrated.

Power Electronics

8
  1. 01Why switching works KRHow fast on-off switching changes voltage with almost no loss.
  2. 02Buck converter design KRCalculating duty cycle, inductor ripple and output capacitance.
  3. 03Boost and buck-boost KRTopologies that step voltage up, or both up and down.
  4. 04Losses and heat KRConduction and switching losses, and choosing a heat sink.
  5. 05Inverters KRTurning DC into AC. Half bridge and full bridge.
  6. 06Batteries and BMS KRLithium cell voltage range, balancing and protection.
  7. 07Isolation and safety KRCreepage and clearance at high voltage, and isolated gate drivers.
  8. 08Measuring power circuits KRViewing switching waveforms safely with differential and current probes.

Motor Control

10
  1. 01Electromagnetic basics KRCurrent makes force, motion makes voltage. What back-EMF really is.
  2. 02DC motor and H-bridge KRFour switches set direction; PWM sets speed.
  3. 03Stepper motors KRMotors that move in fixed steps, and microstepping.
  4. 04Servo motors KRMotors with built-in position feedback, controlled by pulse width.
  5. 05BLDC structure KRA motor where electronic switches replace brushes.
  6. 06Six-step commutation KRSix switch combinations, chosen by the Hall sensors, pull the rotor around.
  7. 07Three-phase inverter KRThree half bridges, dead time and the bootstrap circuit.
  8. 08Phase-current sensing KRSampling phase current in sync with the PWM period.
  9. 09FOC KRTurning three phase currents into two DC values, d and q, to control torque directly.
  10. 10Current, speed and position loops KRNested from the inside out: where control theory meets firmware.

Embedded Linux

8
  1. 01Linux and shell basics KRFile system, permissions, processes, shell scripts.
  2. 02Cross-compiling KRThe toolchain that builds ARM programs on a PC.
  3. 03Boot sequence KRBoot ROM, U-Boot, kernel, root file system, in that order.
  4. 04Device tree KRThe file that tells the kernel which devices sit where on the board.
  5. 05Device drivers KRWriting kernel modules that drive GPIO and I2C devices.
  6. 06User-space I/O KRReaching hardware from an application through sysfs, /dev and ioctl.
  7. 07Yocto and Buildroot KRTools that build a complete Linux image for your board.
  8. 08Real-time Linux KRPREEMPT_RT, measuring latency, and sharing work with an MCU.

Automotive Software

8
  1. 01Vehicle E/E architecture KRFrom ECUs to domain controllers to zonal architecture.
  2. 02Vehicle networks KRWhere and how CAN, LIN and automotive Ethernet are used.
  3. 03AUTOSAR overview KRThe standard software structure of BSW, RTE and SWCs.
  4. 04Diagnostics KRReading fault codes and updating firmware with UDS services.
  5. 05Functional safety KRISO 26262, ASIL levels and safety mechanisms.
  6. 06V-model development KRA process where every stage from requirements to verification has a matching pair.
  7. 07MIL, SIL and HIL testing KRWidening verification from model to software to real hardware.
  8. 08Vehicle cybersecurity KRISO 21434, secure boot and message authentication.