
.text: program code.data: initialized data, larger than 64KB.sdata: initialized data, smaller than 64KB.bss: uninitialized data, larger than 64KB.sbss: uninitialized data, smaller than 64KB.rodata: non-volatile default initialization parameters and data_loader (loader), _wflash (flash programmer), _monitor (debugger)...*.o: compiled, unlinked object files, not human readable*.elf: compiled and linked programs, ready to execute on target architecture, may contain debug information*.hex: pure machine code + address information, binary encoded in hex digits, generated from the ELF file, for use by the flash programmer*.lst: human readable copy of parts of the ELF file, by objdump*.map: lists all symbols in the final program along with their memory addresses and the size of the different sections0 1 2 3 ... p, restart from 0 once p is reachedc; when they're equal, the output changes statep or c change halfway through a cycle, XMC4500 first stores these new values inside shadow registers and only copies them at a safe moment (e.g. counter wraps around or reaches zero) to avoid glitches100% duty cycle ████████████████████ --------------------> time 50% duty cycle ████____████____████ --------------------> time 20% duty cycle ██______██______██__ --------------------> time
100% duty cycle
████████████████████
--------------------> time
50% duty cycle
████____████____████
--------------------> time
20% duty cycle
██______██______██__
--------------------> time| Instruction & Data flow | Interrupt & Multitasking | Debugging | Protection |
|---|---|---|---|
| 3-stage pipeline Floating point unit (FPU) Internal Bus Interconnect |
NVIC SysTick WIC |
Breakpoint unit Watchpoint unit Software trace Instruction trace interface ETM Trace interface Debug interface |
MPU |
add), fixed length instructions
0x0003_F800 (0xFE << 10)0xFEFE_FEFE0x00FE_00FE0xFE00_FE00mov for lower 16 bits, movt for upper 16 bitsldr r0,=0x12345678)b,bxbl, blx (link register needs to be updated)
| Component | What it is | What it does | Role in the circuit |
|---|---|---|---|
| + (Input) | Power source connection | Supplies raw voltage (e.g. battery) | Main energy source |
| C_IN | Input Capacitor | Smooths input voltage, filters noise, provides quick energy | Stabilizes power right at the entrance |
| L1 | Inductor (coil) | Stores energy in magnetic field, resists sudden current changes | Key part of voltage conversion (switching regulator) |
| D1 | Diode | One-way valve for current | Prevents reverse current flow |
| C_OUT | Output Capacitor | Smooths output voltage | Delivers clean, stable VCC |
| VCC | Regulated power output | Clean power rail | Powers the microcontroller and other components |
| Q1 | N-channel MOSFET | Electronic switch controlled by its Gate | Turns power to the load on/off |
| GND | Ground (0V) | Common reference point | Return path for all current |
| Protocol | Year | Topology | Typical Wires | Typical Speed | Best For | Complexity | Typical Distance |
|---|---|---|---|---|---|---|---|
| I²C | 1982 | Bus | SCL, SDA (+GND) | 100 kHz, 400 kHz, 1 MHz, 3.4 MHz | Sensors, EEPROMs, simple peripherals | Low | ≈ 3 m |
| I²S | 1986 | Point-to-Point | SCK, WS, SD (+GND) | Audio clock dependent | Digital audio | Low | ≈ 10 m |
| SPI | Late 1980s | Star (master-slave) | SCLK, MOSI, MISO, SS (+GND) | High (application-dependent) | High-speed peripherals, displays, flash memory | Low | ≈ 10 m |
| UART | Before 1971 | Point-to-Point | TXD, RXD (+GND) | Medium (baud-rate dependent) | Simple device-to-device communication | Very Low | ≈ 10 m |
| RS-232 | 1962 | Point-to-Point | TXD, RXD (+GND) | Up to 115.2 kbps (commonly 9.6–115.2 kbps) | Legacy serial devices, industrial equipment | Low | ≈ 1 km @ 9.6 kbps; ≈ 100 m @ 115.2 kbps |
| CAN | 1986 | Bus | CAN_H, CAN_L | Up to 1 Mbps (distance-dependent) | Automotive and industrial networks | Medium | 500 m @ 125 kbps; 40 m @ 1 Mbps |
| USB | 1996 | Tiered Star | D+, D−, VBUS, GND (USB 2.0) | Very High (1.5 Mbps–80 Gbps depending on version) | General-purpose peripherals | High | 3–5 m (without active repeaters) |
| Category | Review Focus | Example Questions |
|---|---|---|
| Function | Correctness and functionality | Does the code meet requirements? Does each function perform a single task? Are variables initialized before use? |
| Style | Readability and maintainability | Are naming conventions followed? Are comments accurate? Are magic numbers avoided? Is dead code removed? |
| Architecture | Overall software design | Is coupling minimized? Is cohesion high? Are functions appropriately sized? Are global variables minimized? |
| Interfaces | Module interactions | Are parameters validated? Are return values checked? Is error handling consistent? Are interfaces clearly defined? |
| Logic | Control flow and algorithms | Are conditional statements correct? Are loops well-formed? Is recursion justified? Is unreachable code eliminated? |
| Data | Data structures and memory | Are arrays bounds-checked? Are pointers used safely? Is integer overflow considered? Is memory initialized correctly? |
| Timing | Real-time behavior | Are deadlines met? Is worst-case execution time acceptable? Are blocking calls minimized? Are interrupt interactions safe? |
| Reliability & Safety | Robustness and fault tolerance | Are failures handled gracefully? Are assertions used appropriately? Is defensive programming employed? Does the system fail safely? |
| Port | Type | Typical Access Gained | Difficulty | Common Security Status |
|---|---|---|---|---|
| 4-pin | UART | Root shell on Linux (often passwordless) | Very easy | Frequently left open |
| 14-pin | JTAG | Full debug access, memory dump, firmware extraction | Easy–Medium | Often left enabled |


Level Triggered Interrupt Line:
Low ________________________
| |
High | |__________
CPU sees interrupt pending the entire time.Level Triggered Interrupt Line:
Low ________________________
| |
High | |__________
CPU sees interrupt pending the entire time.Edge Triggered Interrupt Line:
Low ________ __________
| |
High |______|
^
Interrupt!Edge Triggered Interrupt Line:
Low ________ __________
| |
High |______|
^
Interrupt!| Feature | Level-triggered | Edge-triggered |
|---|---|---|
| Trigger condition | Signal remains at a level | Signal changes state |
| Repeated if uncleared? | Yes | No |
| Shared IRQ support | Excellent | More difficult |
| Risk of missing interrupt | Low | Higher if edge isn't latched |
| Driver responsibility | Must clear interrupt source | Handle event before next edge |
| Polling | Interrupts |
|---|---|
| CPU checks device repeatedly | Device notifies CPU |
| Can waste CPU cycles | CPU works on other tasks until needed |
| Simple to implement | Requires interrupt hardware and ISR support |
| Response time depends on polling frequency | Usually responds almost immediately |
| Predictable timing | Less predictable due to asynchronous events |
| Symbol | Meaning |
|---|---|
| T_{event} | Average time between events |
| D | Deadline after the event |
| t_{proc} | Time needed to process the event (subroutine duration) |
| t_{poll} | Time for one poll |
| t_{latency} | Interrupt latency (time between outside event and start of subroutine) |
| t_{switch} | Context-switch time |


| Section | Variable Type |
|---|---|
| data | initialized global |
| bss | uninitialized global |
| heap | dynamically allocated |
| stack | local |
.data section are stored in the program image (typically FLASH)*.lst, can be made larger in linker description file but must still fit in PSRAM.bss but not directly, because there is always going to be some allocater header data before the actual data; size not readable from *.lst (use debugger + memory allocation call), size limit is defined instead in linker description and must fit in DSRAM1Power off
↓
FLASH SRAM
+------------------+ +------------------+
| counter = 5 | | garbage |
+------------------+ +------------------+
Power on / Reset
↓
Startup code runs before main()
memcpy(.data in FLASH → .data in SRAM)
memset(.bss, 0)
FLASH SRAM
+------------------+ +------------------+
| counter = 5 | ----> | counter = 5 |
+------------------+ +------------------+
main() startsPower off
↓
FLASH SRAM
+------------------+ +------------------+
| counter = 5 | | garbage |
+------------------+ +------------------+
Power on / Reset
↓
Startup code runs before main()
memcpy(.data in FLASH → .data in SRAM)
memset(.bss, 0)
FLASH SRAM
+------------------+ +------------------+
| counter = 5 | ----> | counter = 5 |
+------------------+ +------------------+
main() starts
rwx / communication channel access), isolation (sandbox, VM, physical isolation...), manipulation detection (hashes, checksums...)
| Symmetric Encryption | Message Authentication Code | |
|---|---|---|
| Confidentiality | ✅ | ❌ |
| Integrity | ❌ | ✅ |
| Authenticity | ✅ | ✅ |
| Non-Repudiation | ❌ | ❌ |
| Asymmetric Encryption | Digital Signatures | |
|---|---|---|
| Confidentiality | ✅ | ❌ |
| Integrity | ❌ | ✅ |
| Authenticity | ❌ | ✅ |
| Non-Repudiation | ❌ | ✅ |




bxns (branch exchange non secure, S \to NS), blxns (branch and link, exchange non secure, S \to NS), sg (secure gateway, NS \to S)
blxns <addr>
bx lrsg followed by b <addr>; stack caller saved registers on non-secure stack, bl func_a
bxns lrtt: test if all parameters transferred to the secure function are accessible to the non-secure caller; most secure property combining SAU + IDAU + MPC + PPC