Embedded Systems Interview Question Bank November 3, 2026 By WatElectronics Are you preparing for an embedded systems interview, firmware engineering job, or technical assessment? This comprehensive collection of 400 embedded systems MCQs with answers and detailed solutions is designed to help students, freshers, experienced embedded engineers, and electronics professionals strengthen their practical knowledge and problem-solving skills. Unlike basic theoretical question banks, this article focuses on real-world embedded engineering problems, covering microcontrollers, C programming, RTOS, interrupts, DMA, memory management, communication protocols, debugging, hardware interfaces, functional safety, cybersecurity, and performance optimization. Each multiple-choice question includes four answer options, followed by the correct answer and a practical explanation. These questions help you understand not only the correct solution but also the engineering principles behind common firmware bugs, hardware failures, timing issues, and system-level design challenges. What You Will Learn Embedded C programming, pointers, memory management, and bitwise operations Microcontroller architecture, interrupts, timers, DMA, and peripheral drivers RTOS scheduling, task synchronization, mutexes, semaphores, and deadlocks UART, SPI, I²C, CAN, Ethernet, and IoT communication Firmware debugging, unit testing, hardware-in-the-loop testing, and validation Functional safety, watchdogs, fault handling, and recovery mechanisms PCB signal integrity, power management, and hardware-software integration Secure boot, firmware updates, embedded cybersecurity, and performance optimization Whether you are a beginner learning embedded systems or an experienced engineer preparing for a senior firmware developer role, these 400 MCQs provide a structured way to assess your knowledge and prepare for practical engineering challenges. Work through the questions topic by topic, review each solution carefully, and use the scenarios to connect theoretical concepts with real embedded product development. Contens Embedded C fundamentals (1-15) Memory layout, linker, and startup (16-30) Microcontroller peripherals, clocks and registers (31-45) Interrupts and Cortex-M exceptions (46-60) Timers, timing analysis and performance (61-75) RTOS tasks, queues and synchronization (76-90) UART, SPI and I²C (91-105) CAN, LIN, RS-485, USB and Ethernet (106-120) ADC, DAC, PWM and signal conditioning (121-135) Digital electronics, power and PCB design (136-150) Sensors, actuators and control (151-165) Bootloaders, firmware updates and startup (166-180) DMA, cache, Flash and data integrity (181-195) Lowpower design (196-210) Automotive embedded systems (211-225) Embedded Linux and device drivers (226-240) Testing, debugging and tooling (241-255) Functional safety and fault handling (256-270) Wireless, IoT and networking (271-285) Embedded security (286-300) Everyday C questions (301-320) Everyday bench problems (321-340) Basic electronics and lab practice (341-360) RTOS, build tools and software basics (361-380) Communication and wireless basics (381-400) 1). A status register is updated by hardware. The loop while (!(STATUS & READY)) {} never exits at -O2, even after the hardware sets the bit. What is the most appropriate fix? Copy the register into a local variable before the loop and poll that copy until it changes Access the register through a volatile-qualified pointer so every read is actually performed Lower the optimization level for the file containing the loop and rebuild the project Declare the register const, so the compiler knows software never writes it and reads it only once None Hint 2). A function returns the address of a local array, and the caller later reads garbage. Which statement best explains this? Local arrays are kept in Flash, so the caller cannot see the modified data The array has automatic storage duration and ceases to exist when the function returns The compiler zeroes every local array on function exit as a built-in security measure of the toolchain Pointers returned from functions are truncated to 16 bits on small targets None Hint 3).With uint8_t a = 200, b = 100; on a 32-bit target, what does (a + b) > 255 evaluate to? Undefined behavior, because the 8-bit addition overflows its own type before it is compared True, because both operands are promoted to int before the addition is performed It depends on whether plain char is signed on this compiler, so no portable answer exists False, because the sum wraps to 44 inside an 8-bit intermediate result before the comparison None Hint 4). Which statement about integer overflow in C is correct? Both are implementation-defined and must be documented by each compiler vendor Unsigned overflow is undefined behavior, whereas signed overflow saturates at the limit Signed arithmetic overflow is undefined behavior, whereas unsigned arithmetic wraps modulo 2^N Both signed and unsigned overflow wrap in two's complement on every conforming compiler None Hint 5). On a 32-bit target, what value does sizeof(buf) produce inside this function? void f(uint8_t buf[32]) { size_t n = sizeof(buf);} 32, because the declared size is part of the parameter's type It does not compile, because arrays cannot be function parameters 1, because uint8_t occupies a single byte 4, because the array parameter is adjusted to a pointer None Hint 6). Two buffers may overlap when data is shifted within one array. Which call is the correct choice? memcpy(), because it detects overlap at run time and copies backward whenever necessary memmove(), which is defined to work correctly for overlapping regions strcpy(), because it stops safely at the first zero byte it meets memset(), because it clears the destination before the copy starts None Hint 7). Firmware decodes a 16-bit little-endian field with uint16_t v = *(uint16_t *)&rx[3];. Why is this risky? It depends on alignment and the CPU's byte order It forces the compiler to keep the rx array in a CPU register It reads only the low byte of the field and silently ignores the high byte It is invalid C, because casts between pointer types are always forbidden None Hint 8). Why is strncpy(dst, src, sizeof dst) not a complete fix for copying an untrusted string? It copies at most four bytes on 32-bit targets If src is at least as long as dst, the result is not null-terminated It stops copying at the first space character in the source string It always writes two terminating bytes, overflowing dst by one None Hint 9). Which declaration best describes a read-only hardware status register located at address 0x40001000? volatile uint32_t *STATUS = (volatile uint32_t *)0x40001000u; static uint32_t *STATUS = (uint32_t *)0x40001000u; const uint32_t *const STATUS = (const uint32_t *)0x40001000u; const volatile uint32_t *const STATUS = (const volatile uint32_t *)0x40001000u; None Hint 10). What is wrong with if (flags & MASK == 0)? Bitwise operators cannot be used inside the condition of an if statement The comparison with zero must be written with the logical operator && The equality operator binds tighter than bitwise AND The expression is always true when MASK is a nonzero constant None Hint 11). A member of a packed structure, of type uint32_t, is read through a pointer on a Cortex-M0. What can go wrong? An unaligned word load can raise a HardFault The access always costs exactly one extra clock cycle but works correctly The member is stored in the opposite byte order from the rest of the structure The compiler refuses to generate code for any structure marked packed None Hint 12). A function declares static int count = 0; inside its body. Which statement is true? The variable is re-created on the stack and reset to zero at every call The variable is allocated on the heap the first time the function runs The variable is visible to every other source file at link time The variable keeps its value between calls and lives in static storage, not on the stack None Hint 13). A protocol field is declared as an enum and overlaid directly on the bytes of a received frame. What is the main portability problem? The storage size of an enum is implementation-defined Enums are always placed in Flash, so they cannot hold received data Enumeration constants are evaluated at run time, which adds latency Enumerations can only hold values up to 127, so larger fields are truncated None Hint 14). Why is #define SQUARE(x) x * x dangerous when it is called as SQUARE(a + 1)? It rounds the result to the nearest integer before returning it It cannot be used with local variables, only with global ones It evaluates the expression a + 1 twice, which doubles the execution time of every call It expands to a + 1 * a + 1, because the parameter is not parenthesized None Hint 15). A local variable int i; is read before it is ever assigned. What does the C standard say about its value? The compiler sets it to the largest representable int so the mistake is easy to spot The value is guaranteed to be zero on every conforming compiler The value is whatever the previous function left on the stack, which is guaranteed to be stable D The value is indeterminate, so the program is incorrect and may behave differently between builds None Hint None 16). Which section does the startup code clear to zero before main() runs? rodata, which holds the string literals and is cleared by the loader before main() .bss, which holds static variables that are zero-initialized or uninitialized .isr_vector, which holds the exception handler addresses and is zeroed at every boot .text, which holds the executable instructions and is copied into RAM at start-up None Hint 17). The global int g = 5; must have the value 5 when main() starts. Which startup step makes this happen? Clearing the .bss region, which sets each global to its declared initial value Running the linker again once the final address of the variable is known Copying the initial values stored in Flash into the .data region in RAM Programming the RAM contents through the debugger on every reset None Hint 18). On an AVR-style Harvard MCU, why can a const lookup table still consume scarce RAM unless special handling is used? The const qualifier prevents the compiler from generating load instructions Flash and RAM are separate address spaces The linker cannot place any array larger than 256 byteicated into RAM when thes in Flash A const object is always dupl linker merges sections None Hint 19). Which approach gives the most reliable estimate of a task's worst-case stack use? Using the largest stack size for which the compiler prints a warning during the build Reading the stack pointer once at the start of main() and doubling the value that was found Static call-graph analysis (for example -fstack-usage) plus measured high-water marks under stress Counting the local variable declarations in the source file of the task and then multiplying that number by four None Hint 20). A long-running system cannot allocate a 2 KB block although 10 KB of heap is free in total. What is the likely cause? Flash wear leveling has used up all of the spare sectors of the device Heap fragmentation, so no single contiguous free block is large enough The stack has grown into the .data section and corrupted the allocator state The watchdog has reset the allocator after the heap operation timed out None Hint 21). A new feature makes the build exceed the available RAM. What is the most efficient way to see where RAM is being used? Compare the CPU clock settings between the two builds Single-step through the startup code and watch the stack pointer Run the unit tests again with coverage instrumentation enabled Inspect the linker map file for section and symbol sizes None Hint 22). A DMA buffer must be located in a RAM region that the DMA controller can reach. How is this normally achieved? Place the buffer in a named linker section that is mapped to the suitable memory region Allocate the buffer on the stack of the task that starts the transfer Declare the buffer volatile so the compiler picks a DMA-capable address Cast the buffer address to uint32_t before starting the transfer None Hint 23). A diagnostic record must survive a watchdog or software reset, but not necessarily a power cycle. Which technique is appropriate? Write it to Flash on every function entry, so the latest state is always present Store it in .bss, because the contents of .bss are preserved across every kind of reset including power loss Keep it in a local variable inside the reset handler so that it retains its value Place it in a .noinit RAM section that startup code does not clear, and protect it with a CRC None Hint None 24). Which pair of build options lets the linker discard unreferenced functions to reduce Flash size? -fno-inline at compile time and -Wl,--cref at link time -fno-builtin at compile time and -Wl,--strip-debug at link time -ffunction-sections at compile time and -Wl,--gc-sections at link time -fstack-usage at compile time and -Wl,-Map=out.map at link time None Hint 25). Enabling floating-point support in printf() noticeably increases Flash and RAM use on a small MCU using newlib-nano. Why? printf() converts every float into a heap-allocated string at compile time The full floating-point formatting code and buffers are linked in; newlib-nano leaves them out by default Floating-point formatting disables the linker's garbage collection of unused sections for the whole image The MCU must emulate its UART in software to be able to print decimal digits None Hint 26). What is the purpose of providing _sbrk() (or an equivalent hook) in a bare-metal newlib project? It switches the CPU between privileged and unprivileged mode It relocates the vector table into RAM It selects the clock source used by the system tick It tells malloc() where the heap starts and ends None Hint 27). A calibration block must be patched by a factory tool at a known address without rebuilding the firmware. Where should it be placed? On the heap, allocated during the first boot of the device in the field Anywhere in .bss, because the tool can search for the variable name at run time In a dedicated linker section with a fixed address, marked KEEP so it is not discarded None Hint 28). How can an MPU help to detect stack overflow in an RTOS task? A no-access guard region below the stack that raises a memory fault on the first overflowing write Disabling the data cache around the stack so that writes always reach memory before the next instruction runs Marking the stack region as executable, so that function returns are faster Enlarging the heap so that the stack can never run out of room in any task None Hint 29). Why does char *s = "abc"; s[0] = 'x'; typically fail on an embedded target? Writes to character arrays always require a lock on the string table The compiler pads literals to four bytes and rejects partial stores String literals are normally placed in read-only memory such as Flash The pointer s is null until the first call to strlen() None Hint 30). A C++ global object's constructor configures a UART, but the UART does not work. What is the likely cause? Static constructors run from the startup code before main(), before clocks and peripherals are configured Global objects are constructed by the RTOS scheduler when it starts the first task, so they exist only after that x Constructors are skipped unless the object is declared volatile in its definition Constructors run only after the first interrupt has occurred in the system None Hint 31). Firmware sets a peripheral's enable bit, but nothing happens and register reads return zero. What should be checked first? Whether the compiler generates little-endian code for the target device Whether the stack pointer is aligned to an 8-byte boundary after reset Whether the linker placed the code into the .text section of the image Whether the peripheral's clock is enabled in the clock-control registers None Hint 32). Status bit 3 is write-one-to-clear (W1C). Which statement clears only that flag? STATUS |= (1u << 3); STATUS = 0; STATUS &= ~(1u << 3); STATUS = (1u << 3); None Hint 33). Why do many MCUs offer separate set and reset registers (such as BSRR) for GPIO outputs? They change selected pins atomically, avoiding a read-modify-write that an interrupt could corrupt They allow a pin to be driven at a higher voltage than the supply of the MCU, for example for level shifting They double the maximum toggle frequency by using both edges of the clock. They make the input value of the pin readable within a single bus cycle None Hint 34). To change a 3-bit field at bits 4 to 6 of a control register without disturbing other bits, which sequence is safest? Write 0xFFFFFFFF first to reset every field to ones, then OR in the new value Read the register, clear the field with a mask, OR in the shifted new value, then write it back Write the shifted new value directly, since unused bits are ignored by the hardware OR the new value into the register without clearing the old field first None Hint 35). A GPIO configured as open-drain never reaches a logic-high level, even though the output latch is 1. Why? An open-drain output can only pull low or release the line Open-drain outputs are limited to analog signals and cannot drive digital levels The output latch must be written twice before the pin changes state The pin must first be configured as a timer input capture None Hint 36). A push-button input shows random presses while the button is open. What is the correct fix? Switch the pin to open-drain output mode, so that the input is pulled low by the MCU itself Increase the output speed setting of the GPIO port to its maximum value Enable the ADC channel on the same pin, so that it reads a stable level Enable a pull-up or pull-down so the open input rests at a defined logic level None Hint 37). Firmware drives a pin low, but the pin measures high. The pin is shared with a timer output. What should be verified? The alternate-function selection of that pin in the pin multiplexer The size of the heap that is reserved in the linker script of the project The tick frequency that was configured for the RTOS in its header file The baud-rate divisor of the UART peripheral that is closest on the die None Hint 38). A UART produces the wrong baud rate after the PLL is configured for 120 MHz. What is the most likely oversight? The PLL multiplies the baud rate by its own factor automatically The compiler packs the baud divisor into seven bits when optimizing for size The UART is clocked from a bus prescaler or mux whose frequency differs from the CPU clock The UART data register is declared const in the header file of the driver None Hint 39). Why should the MCU errata sheet be read before debugging a misbehaving peripheral? It replaces the electrical characteristics given in the datasheet B. It contains the pinout used by the evaluation board C. It explains which compiler options the device requires D. It lists known silicon defects and their workarounds It contains the pinout used by the evaluation board It explains which compiler options the device requires It lists known silicon defects and their workarounds None Hint 40). After reset is released, the MCU starts from the wrong memory. Which cause is most plausible? The stack pointer is loaded from the .data section instead of the vector table, so execution starts elsewhere The ADC reference is unstable during the start-up phase of the device The boot-configuration pins are sampled at reset release and are pulled to an unintended level The watchdog is configured with a timeout that is too long for the boot phase None Hint 41). A 32-bit peripheral register is written with an 8-bit store through a uint8_t *. What can happen? The peripheral may ignore the partial write or trigger side effects, per its access rules The CPU automatically merges four byte stores into one atomic word write The bus matrix converts the byte access into a read of the full word The register becomes write-protected until the next reset occurs None Hint 42). After enabling an external crystal, firmware immediately selects it as the system clock, and the MCU hangs. What should the code do instead? Switch the clock to the crystal first and enable the crystal afterwards Run an empty loop of one million iterations, which works on every device Wait for the oscillator-ready flag, with a timeout, before switching the clock source Disable the watchdog permanently, so that there is enough time for the oscillator to start up None Hint 43). A peripheral works after power-on but not after a software reset. What is a plausible reason? Some registers or power domains keep their old state while the startup code assumes reset defaults The instruction cache switches to data-only mode after any software reset occurs A software reset erases the on-chip Flash, so every stored setting has to be restored A software reset reverses the byte order of the internal bus until the next power cycle None Hint 44). What does a brown-out reset (BOR) circuit do? It limits the current flowing into GPIO pins It holds the MCU in reset while the supply is below a threshold It boosts the supply voltage when the battery is low It detects a full Flash and starts garbage collection of the oldest stored records None Hint None 45). What is the purpose of a clock security system (CSS) on an MCU that normally runs from an external crystal? It encrypts the clock configuration registers against unauthorized writes It detects crystal failure, switches to an internal oscillator, and raises an interrupt It tunes the crystal load capacitance at run time for the best accuracy It synchronizes the CPU clock to an external reference such as a GPS signal None Hint 46. An interrupt never fires, although the peripheral's interrupt-enable bit is set. Which other enables are involved? The timeout window that is configured in the watchdog of the device Only the compiler's interrupt-handling option, which is turned off by default in most embedded toolchains The interrupt's enable in the NVIC (or equivalent controller) and the CPU's global interrupt mask The speed setting of the GPIO port that the interrupt pin is connected to None Hint 47). An ISR must read an I²C sensor, run a filter and update a display. What is the best design? Signal the event from the ISR and do the heavy work in a task or the main loop Add delays inside the ISR to give the sensor time to settle between reads Run all of the work inside the ISR, to keep the latency as low as possible Give the ISR the highest priority and mask every other interrupt while it runs None Hint 48. Mid[] A 32-bit counter shared between an ISR and main code is read on an 8-bit MCU. What is the hazard? An 8-bit MCU cannot hold a 32-bit value in memory, so the counter is truncated An ISR is not allowed to modify any variable that is declared volatile in the program The read takes several instructions, so the ISR can change the value halfway, causing a torn read The counter automatically becomes a signed type as soon as it is shared with an ISR None Hint 49). An ISR sets a boolean flag for every pulse, and the main loop clears it after handling. Occasionally pulses are lost. Why? The main loop runs at a lower supply voltage than the ISR Booleans are updated only on even clock cycles The compiler removes ISR writes to global variables A boolean records only that something is pending None Hint 50. A level-triggered interrupt re-enters immediately each time the ISR returns. What is the likely cause? The priority of the ISR is too low The ISR did not clear or service the source The NVIC pending bit was cleared before the ISR started Level-triggered interrupts always repeat exactly twice None Hint 51). On Cortex-M, which statement about interrupt priority numbers is correct? A lower numeric value means higher urgency, and only a more urgent ISR can preempt Priority numbers are ignored whenever the global interrupt mask is clear All interrupts share a single priority unless the RTOS reconfigures them A higher numeric value means higher urgency, and only such an ISR can preempt a running lower one None Hint 52). A HardFault occurs. What is the most direct way to find the faulting instruction? Read the stacked PC from the exception frame and check the fault status registers Compare the heap usage measured before and after the fault occurred in the system Read the current value of the PC register inside the fault handler and print it Check the value of the system tick counter at the moment the fault was taken None Hint 53). Roughly how many cycles does a Cortex-M3 or M4 need from an interrupt request to the first instruction of the ISR (zero wait states, no higher-priority exception)? About 1 cycle, because the NVIC bypasses the pipeline completely About 120 cycles, because software must first save the context It depends only on the length of the ISR that is being entered About 12 cycles, mostly used for hardware stacking of the context None Hint 54). Nested interrupts are enabled. What extra check is needed in the design? All ISRs must run at the same priority level, so that none of them can be nested The vector table must be moved into RAM, so the nested vector lookups are faster The worst-case stack depth must include the frames of every interrupt that can preempt another The heap size has to be doubled, because deeper call chains allocate more memory dynamically at run time None Hint 55). Why might firmware use BASEPRI rather than PRIMASK for a critical section on Cortex-M3 or M4? BASEPRI masks only interrupts at or below a chosen priority B. BASEPRI is faster than every other instruction C. PRIMASK cannot be restored once it has been set D. BASEPRI makes the section atomic across multiple cores BASEPRI masks only interrupts at or below a chosen priority B. BASEPRI is faster than every other instruction PRIMASK cannot be restored once it has been set BASEPRI makes the section atomic across multiple cores None Hint 56). Why should an ISR avoid calling printf() or malloc()? They permanently disable all interrupts once either function has been called They are non-reentrant, may block, and can corrupt state of the interrupted code They need a floating-point unit, which is unavailable while the core is in an ISR They can only be called from the reset handler, before any interrupt is enabled None Hint 57). What problem does this check-then-sleep sequence have? if (!event_flag) { __WFI(); } The compiler turns the flag test into an infinite loop WFI cannot be executed outside an interrupt handler WFI always resets the watchdog timer An interrupt may set the flag between the test and WFI None Hint 58). An ISR clears the peripheral's interrupt flag as its last action, yet the ISR runs a second time immediately. What can explain this? The NVIC raised the ISR priority automatically on return from the handler, so it preempted itself The write to the peripheral was posted and had not taken effect when the exception returned The stack pointer was restored from the wrong stack on exception return Clearing an interrupt flag always triggers one extra interrupt by design None Hint 59). What is a consequence of using the FPU inside an ISR on a Cortex-M4F with lazy stacking? The FPU registers can only be used by the main thread Interrupts are masked while any FPU instruction executes Floating-point results are rounded to integers on exception entry The FPU registers are stacked when the ISR first uses the FPU None Hint 60). A critical ISR shows occasional slow executions on a Flash-based MCU. Which hardware factor is a typical cause? The parity setting of the UART that is used for logging The sampling time that is configured for the ADC channel The resolution of the RTC alarm that the application has configured Flash wait states and cache or prefetch misses None Hint 61). [Mid] A timer is clocked at 48 MHz, and its counter clock is f / (PSC + 1). With PSC = 47, what is the counter frequency? 47 kHz 1.02 MHz 2.04 MHz 1 MHz None Hint 62). Which expression computes elapsed ticks correctly when a free-running unsigned 32-bit timer may wrap? (uint32_t)(now - start) now + start now > start ? now - start : 0 (int32_t)now - (int32_t)start + 1 None Hint 63). A 16-bit input-capture timer must measure pulses that can be longer than one counter period (65,536 ticks). What is required? Compare the two capture values as signed numbers instead of unsigned ones Reduce the CPU clock so that the timer counts more slowly than before Disable the input-capture filter so that no edges are ever missed Count overflow events, or use a wider or cascaded timer so the full pulse length is captured None Hint 64). A 72 MHz timer with PSC = 0 counts from 0 to ARR in up-counting mode. Which ARR value gives a 20 kHz PWM period? 3599 7199 1799 3600 None Hint 65). A task ends each iteration with vTaskDelay(10), and its work takes 3 ms. What is the actua About 3 ms, because the delay is shorter than the time spent doing the work About 7 ms, because the delay overlaps with the time spent doing the work Exactly 10 ms, because the RTOS automatically compensates for the work time About 13 ms, since the delay starts after the work; use vTaskDelayUntil() None Hint 66). Three periodic tasks with utilizations 0.25, 0.25 and 0.20 run under rate-monotonic scheduling. The Liu-Layland bound for n = 3 is about 0.78. What can be concluded? No conclusion is possible without measuring the interrupt load Utilization above 0.5 guarantees that at least one deadline is missed Total utilization of 0.70 is below the bound The bound applies only to earliest-deadline-first scheduling None Hint 67). Task A (C = 2 ms, T = D = 5 ms) is preempted by a higher-priority task B (C = 1 ms, T = 4 ms). What is A's worst-case response time, ignoring other overhead? 4 ms 2 ms 3 ms 5 ms None Hint 68). What does jitter describe in a periodic task? The amount of stack memory that is reserved for the task Variation between intended and actual start or output times of consecutive cycles The resolution of the hardware timer that triggers the task The average CPU utilization of the task over a long observation window of several seconds None Hint 69). Which Cortex-M facility provides a low-overhead, cycle-accurate way to time a code section? The watchdog down-counter, which restarts at every kick The DWT cycle counter (CYCCNT), where the core implements it The SysTick reload value alone, read at the start and end of the section The NVIC pending-interrupt register sampled once per millisecond None Hint 70). A mechanical switch produces several edges for each press. Which software approach is common? Accept a new state only after it stays stable for a defined time, such as 10 to 20 ms Sample the pin only inside the highest-priority interrupt of the system Increase the resistance of the pull-up resistor to slow down the edges Act on every raw edge and filter the results later in the user interface None Hint 71). A developer unrolls a loop eight times to gain speed, and the firmware no longer fits in Flash. What trade-off does this show? The code runs slower in exchange for a smaller binary Fewer branches and less loop overhead in exchange for larger code More RAM is used, but the size of the code remains unchanged The stack alignment of the interrupt handlers changes, with no other effect on the build None Hint 72). When is a precomputed lookup table preferable to computing a function at run time on a small MCU? Only when the table is allocated on the stack of the calling task at run time The function is expensive, the input range is small, and Flash is available Only when the function contains floating-point arithmetic, which tables cannot hold Always, because a lookup table never consumes any Flash or RAM on the device None Hint 73). A Cortex-M0+ part with no FPU runs a filter written with float. Which change usually reduces execution time most? Declare the float variables volatile, so the compiler adds no extra rounding steps Rewrite the filter in fixed-point integer arithmetic such as Q15 Move the filter into a lower-priority interrupt, which lets an FPU run it Compile the filter without optimization, which gives more predictable timing None Hint 74). A task needs 100 µs to process 10 samples, but 20 samples arrive every 100 µs. What does enlarging the buffer achieve? It only delays the overflow, because the consumer is permanently slower than the producer It permanently solves the problem, provided that the buffer is large enough It reduces the sampling rate of the sensor through back-pressure It raises the processing rate of the task by spreading the work evenly None Hint 75). A software delay loop for (i = 0; i < 100000; i++); stops working when the optimization level is raised. Why? Higher optimization levels remove the timer peripheral A loop with no side effects can be removed by the compiler The loop counter silently becomes a floating-point variable Optimization levels change the CPU clock frequency None Hint 76). Task L (low priority) holds a mutex that task H (high priority) needs, and a medium-priority task M preempts L. What is this problem called, and what mitigates it? Deadlock; giving H a longer timeout on the mutex solves the problem completely and permanently in every case Starvation of M; swapping the priorities of L and M solves the problem Priority inversion; priority inheritance temporarily raises L's priority while it holds the mutex Stack overflow in H; enlarging the stack of task H solves the problem None Hint 77). Why should a mutex, rather than a binary semaphore, protect a shared resource? A mutex has an owner and can apply priority inheritance, while a binary semaphore does neither A mutex can be released from an ISR, whereas a binary semaphore cannot A mutex counts how many tasks are waiting for the shared resource A binary semaphore always needs more RAM than a mutex in the same kernel None Hint 78). Two tasks take mutexes A and B in opposite orders, and both block forever. Which design rule prevents this? Give both tasks the same priority, so that neither can preempt the other Always acquire multiple locks in one agreed global order Increase the RTOS tick rate so that blocked tasks wake up sooner Use a semaphore instead of a mutex in one of the two tasks None Hint 79). In FreeRTOS, an ISR unblocks a high-priority task with xSemaphoreGiveFromISR(). What must the ISR do afterwards? Pass the woken flag to portYIELD_FROM_ISR() so a context switch happens on ISR exit Call vTaskDelay() so that the woken task has time to start running before the ISR returns Disable the scheduler until the woken task has finished its work Take the same semaphore again to confirm that it was delivered None Hint 80). Which technique is safe for passing large payloads between tasks through a queue? Queue pointers to fixed-pool buffers and transfer ownership; the consumer returns each buffer Share one static buffer and let the producer overwrite it whenever it is needed Queue pointers to the producer's stack buffers and let the consumer read them quickly Pass the pointer through a global variable instead of through the queue itself None Hint 81). How can an RTOS stack overflow be found early during development? Run the system at a lower CPU clock so that the stacks are used less Add more mutexes around the variables that live on the stack Increase the tick frequency of the kernel so that stack overflows are detected much sooner by the scheduler Enable stack-overflow checking and watch each task's high-water mark under stress tests None Hint 82). The highest-priority task never blocks and runs a polling while (1) loop. What happens to lower-priority tasks? They inherit its priority and therefore run before it does They are scheduled round-robin together with the high-priority task The scheduler lowers its priority after about 10 ms of continuous execution They are starved, because a ready higher-priority task always preempts them None Hint 83). A task locks a standard (non-recursive) mutex and then calls a helper that locks the same mutex again. What happens? The mutex counts up to two and execution simply continues The kernel demotes the task to idle priority until the mutex is free The task blocks forever on itself, unless a recursive mutex is used The second lock is ignored silently and execution continues normally None Hint 84). When is a direct-to-task notification (for example xTaskNotifyGive) preferable to a binary semaphore in FreeRTOS? When an ISR or task signals exactly one known task When more than four bytes of data must be transferred When many tasks must wait for the same event When a mutex with priority inheritance is required None Hint 85). How does the immediate priority ceiling protocol differ from priority inheritance? It lowers the priority of the tasks that are waiting for the lock A task that locks a resource immediately runs at the resource's ceiling priority It needs dynamic memory allocation for each lock that is created It applies only to counting semaphores and never to mutexes None Hint 86). Two tasks with the same priority are always ready. How does a typical preemptive RTOS schedule them? By time slicing in round-robin order at each tick, if time slicing is enabled They run simultaneously on a single core by sharing the pipeline The task with the larger stack is run first at every tick interrupt The first task that was created runs forever, and the other one is never given the CPU None Hint 87). Why is holding a mutex while waiting 500 ms for a UART reply a poor design? It drives the mutex count negative and corrupts the internal kernel state Every other task needing the mutex is blocked meanwhile, extending its worst-case latency The kernel releases the mutex automatically at the next tick interrupt It disables interrupts globally for the entire duration of the wait None Hint 88). What restriction applies to RTOS software-timer callbacks? They may call vTaskDelay() freely They run inside the ISR of the hardware timer They run in the timer service task Each callback has its own private stack None Hint 89). What does tickless idle do? It increases the tick rate to 10 kHz for finer timing It stops the periodic tick while idle and programs a wake-up timer It removes the idle task from the scheduler to save RAM It halts the scheduler while interrupts are being executed, which saves power in idle None Hint 90). An ISR whose priority is more urgent than configMAX_SYSCALL_INTERRUPT_PRIORITY calls xQueueSendFromISR(). What is the result? The kernel raises the priority of the queue automatically It works, because the FromISR variants are safe at any interrupt priority Only the tick interrupt of the kernel is affected by the call Undefined behavior: such ISRs are never masked by the kernel and must not call RTOS APIs None Hint 91). What approximate baud-rate mismatch between transmitter and receiver is the practical limit for reliable 8N1 UART reception? Exactly 0 percent, because any mismatch at all causes a framing error in every single frame About 50 percent, because only the start bit has to be detected About 20 percent, because the receiver resynchronizes on every start bit About 2 to 3 percent, because the sampling point drifts across a ten-bit frame None Hint 92). A UART link shows framing errors only after the other device was replaced. What should be checked first? The CAN bit timing that is used on the other bus of the board The tick period of the RTOS that runs on the device That baud rate, data bits, parity and stop bits match on both ends The SPI mode that is configured in the sensor on the same board as the MCU None Hint 93). A UART receiver loses bytes in bursts at 921,600 baud with a one-byte buffer and one interrupt per byte. What is a robust redesign? Send the data from an RTOS software timer at a fixed rate Lower the priority of the receive interrupt so that other tasks can run Disable parity checking, so that each byte takes less time to receive Use DMA into a ring buffer, with idle-line or half-transfer interrupts to process chunks None Hint 94). A DMA transmit-complete interrupt fires, but a scope shows the last byte is still leaving the pin. Why? The scope probe adds a propagation delay to the signal that it is measuring on the pin B. The DMA controller runs at half of the UART clock, so the last byte lags behind the interrupt C. DMA completion means the data reached the UART, not that the shift register finished D. The last byte of every DMA transfer is repeated by the hardware, extending the frame The DMA controller runs at half of the UART clock, so the last byte lags behind the interrupt DMA completion means the data reached the UART, not that the shift register finished The last byte of every DMA transfer is repeated by the hardware, extending the frame None Hint 95). An SPI sensor returns shifted data although the clock frequency is within limits. Which settings should be verified? CPOL/CPHA mode and bit order against the sensor's timing diagram The pull-up resistance on the SDA line of a neighboring I²C bus on the board The value of the termination resistor fitted at the far end of the cable The parity and stop-bit settings of the frame format that the sensor uses None Hint 96). A second SPI slave is added, and the first slave stops working. Which hardware issue is typical? The clock must be reduced below 1 kHz B An unselected slave does not tri-state its MISO output The bus requires both slaves to share one chip-select line SPI cannot support more than one slave on a bus None Hint 97). Some SPI devices need chip-select held low across all bytes of a command. What happens if the driver toggles CS between bytes? The clock frequency doubles automatically, because two transactions are in progress at the same time The device switches into I²C mode whenever CS is toggled in the middle of a command The data is transmitted twice, once for each chip-select edge that is generated The device treats each byte as a new transaction and may discard or misinterpret the command None Hint 98). An I²C sensor works at 100 kHz but fails at 400 kHz. Which physical factor is key? The device address is too long to be accepted while the bus runs in fast mode The rise time set by pull-up resistance and bus capacitance exceeds the limit for fast mode The slave stops acknowledging above 100 kHz by design, which is a normal limit SDA and SCL swap their roles at the higher speed, so the slave misreads the clock None Hint 99). An I²C slave holds SDA low after the master was reset in the middle of a transfer. How is the bus usually freed? Remove the pull-up resistors and reapply power to the bus Drive SDA high with a strong push-pull output until the slave releases the line again by itself Send the general-call address followed by a reset command Toggle SCL up to nine times until SDA is released, then generate a STOP condition None Hint 100). A datasheet gives an I²C write address of 0xD0, but another source lists the device at 0x68. Why? 0xD0 is the general-call address of the I²C bus The address has to be inverted for read transfers 0xD0 is the 7-bit address 0x68 shifted left with the R/W bit appended They are two separate devices that share the same bus None Hint 101). A bit-banged I²C master works with most devices but fails with a sensor that holds SCL low during a conversion. What is missing? Clock-stretching support, so the master releases SCL and waits until it actually goes high A repeated START condition before each byte that is transferred Hardware flow-control signals between the master and the slave A stronger pull-up resistor on the SDA line, to speed up the rising edge of the bus after each stretch None Hint 102). A master receives a NACK after sending an I²C address byte. What does this usually indicate? The slave accepted the data and would like to receive more of it The checksum of the transferred data was valid The master has won bus arbitration against another master No device acknowledged that address, or the device is busy or unpowered None Hint 103). A 1.8 V sensor shares an I²C bus with a 3.3 V MCU. What is a standard approach? A unidirectional buffer on the SDA line, plus a second one on the SCL line A bidirectional open-drain level shifter, or devices tolerant of the higher level A resistor divider on both SDA and SCL, which lowers 3.3 V levels to 1.8 V A faster clock rate, so that the two signal levels eventually converge on the bus None Hint 104). In full-duplex SPI, how does a master read a register value from a slave? It sends the command, then clocks out dummy bytes while capturing the data on MISO It reads the MOSI line directly after it has sent the command byte to the device, ignoring the clock It waits for the slave to push the register data onto MISO without any clock It holds CS high until the slave signals that the register data is available None Hint 105). A sensor delivers a 12-bit signed value left-justified in a 16-bit register. How should firmware convert it? Combine the bytes and arithmetic-shift the signed value right by 4 to keep the sign Shift right by 4 as an unsigned value and treat the result as positive Mask the upper four bits to zero and use the remaining bits Cast the two raw bytes directly to int32_t without any shifting None Hint 106). How does CAN resolve two nodes that start transmitting at the same time? Bitwise arbitration on the identifier: dominant beats recessive and the loser stops cleanly A token that is passed from node to node around the bus The node with the higher MAC address wins after both retransmit Collision detection with random back-off, as in classic shared-medium Ethernet networks None Hint 107). With power off, an engineer measures about 60 Ω between CANH and CANL on a correctly terminated bus. Why? One 60 Ω terminator is installed in the middle of the bus The ground reference is floating Two 120 Ω terminators at the bus ends are in parallel Each transceiver presents 60 Ω by itself None Hint 108). Why is the CAN sample point typically set at around 75 to 87.5 percent of the bit time? It prevents arbitration from taking place while identifier bits are on the bus It makes the bus run faster than the nominal bit rate would otherwise allow It lets propagation delay and edge settling finish before the bit value is sampled It matches the CAN baud-rate generator to the bit timing of an attached UART None Hint 109). A CAN node's transmit error counter exceeds 255. In which state does the node end up? Idle, with the retransmission continuing automatically Sleep mode, from which it wakes only at the next power cycle Bus-off, where it stops taking part in bus traffic until it recovers Error-active, with a higher arbitration priority than before, because the node has proven itself None Hint 110). What are the main differences between CAN FD and classic CAN? Payloads of 16 bytes per frame and removal of the CRC error detection Payloads up to 64 bytes and an optional faster bit rate during the data phase Support for 1 km cable lengths at a bit rate of 10 Mbit/s on twisted pairs A new arbitration scheme that does not use message identifiers at all None Hint 111). A lone CAN node on a bench keeps retransmitting a frame and reports ACK errors. Why? The identifier is too long for the controller No other node acknowledges the frame The bus needs a 5 V supply on the data line CAN requires a pull-up resistor on each node None Hint 112). Why configure acceptance filters in the CAN controller hardware? They encrypt the messages that the node receives They raise the bit rate of the bus above the nominal value whenever the load is low The controller discards irrelevant frames without CPU interrupts They give the receiving node a higher arbitration priority None Hint 113). In a LIN network, which node initiates every frame? The slave with the lowest identifier, once the bus has become idle The node with the largest receive buffer, while the others only answer it The master, which sends the break, sync field and protected identifier Any slave, as soon as it has new data to send, after which the master reacts None Hint 114). A half-duplex RS-485 network has several nodes. Which rule avoids bus contention? A master-slave (polling) protocol such as Modbus Tie each node's driver-enable pin to ground Enable every driver permanently to improve signal strength Use two stop bits on all nodes None Hint 115). An idle RS-485 line produces random characters at the receivers. What is the remedy? Add fail-safe bias resistors so the idle bus has a defined level Remove the termination resistors from both ends of the cable to reduce loading Reduce the baud rate to 300 baud, so that the noise on the idle line averages out Connect line A and line B together at the receiver input to force a known state None Hint 116). A full-speed USB device enumerates unreliably when clocked from the MCU's internal RC oscillator. Why? USB needs a clock accurate to about 0.25 percent USB descriptors must be stored in RAM instead of Flash USB requires a reference clock above 1 GHz for all transfers RC oscillators cannot be used together with DMA transfers None Hint 117). In an RMII Ethernet design, what does the MCU's MAC connect to? To a USB hub controller that provides the frame timing for the Ethernet link An external or integrated PHY, over a reduced-pin interface with a 50 MHz clock To a CAN transceiver that is located on the same board as the MCU Directly to the RJ45 connector, without any PHY or magnetics in between None Hint 118). A control system sends setpoints every millisecond over a local Ethernet. Which transport suits it better? HTTP over TLS, because it provides reliable, secure and ordered transport for every setpoint ICMP echo packets, because they have the lowest protocol overhead of all IP protocols UDP, since TCP retransmission would add unbounded latency to data that is stale anyway TCP, because its acknowledgements and retransmissions guarantee timely delivery of every segment None Hint 119). Why do CAN, RS-485 and USB use differential signaling? It halves the length of the cable that is required for the installation It needs only a single wire for each signal The receiver evaluates the difference between two lines It increases the supply voltage of the transceiver None Hint 120). In Modbus RTU, how is the end of a frame detected? By a null terminator byte at the end of every frame By the CRC value, which marks the last byte of the frame By a silent interval of at least 3.5 character times By a dedicated start-of-frame byte that the master sends None Hint 121). What is the ideal LSB size of a 12-bit ADC with a 3.3 V reference? About 0.806 mV About 8.06 mV About 0.0806 mV About 3.3 mV None Hint 122). A ratiometric sensor is powered from the same 3.3 V rail that serves as the ADC reference. What is the benefit? It doubles the effective resolution of the converter by reusing the same reference It removes the quantization error that is inherent to any ADC conversion Supply variations scale the sensor output and the reference equally It eliminates the sampling time that the converter needs for its input to settle None Hint 123). How can aliasing of a signal with components up to 7 kHz be avoided? Sample at exactly 7 kHz, which equals the highest frequency present Sample above 14 kHz and use an analog low-pass filter ahead of the ADC Increase the resolution of the ADC to at least 16 bits Sample at 3.5 kHz, which is half of the highest frequency None Hint 124). A sensor with a 100 kΩ output impedance gives inaccurate ADC readings. What is a typical fix? Lower the ADC reference voltage so that the signal uses less of the available input range Increase the conversion speed so that the sample is taken sooner Add a pull-down resistor to the output of the sensor Increase the sampling time, or add a buffer amplifier so the sample capacitor can charge None Hint 125). By oversampling and decimation, how many samples are needed to gain 2 extra bits of resolution? 16 samples, because each extra bit of resolution needs four times as many samples 8 samples, because averaging improves resolution by one bit per doubling 4 samples, because each extra bit of resolution needs only twice as many samples 32 samples, because each extra bit of resolution needs eight times as many samples None Hint 126). A 0 to 10 V signal must be measured by a 0 to 3.3 V ADC. Which design is better? Apply a software gain of 0.33 after the conversion A resistive divider with overvoltage clamping, or a buffered scaling stage Connect it directly, and let the ADC saturate above 3.3 V Add a 1 Ω pull-down resistor at the input of the ADC None Hint 127). Which approach linearizes an NTC thermistor reading in firmware? Apply the Steinhart-Hart or Beta equation, or a calibrated lookup table Raise the PWM frequency that is used by the heater Average more samples, which removes the nonlinearity Assume the voltage is proportional to temperature over the whole measurement range None Hint 128). ADC readings fluctuate by several LSB, and the reference pin is shared with noisy digital supply. What helps most? Decouple the reference pin and use a quiet, low-noise reference source Convert the result to a signed format before filtering, so that the noise cancels Insert a software delay before each conversion, so the reference can recover Increase the ADC clock speed, so that conversions finish before the noise arrives None Hint 129). When should ADC conversions be triggered relative to a motor-driver PWM to avoid switching noise? Only at the first edge of each period, whatever the load During the switching edges, where the signal is largest At random times, so that the switching noise is averaged out At a fixed quiet point of the PWM period, using the timer to trigger the ADC None Hint 130). A PWM output is low-pass filtered to create a DC voltage. What is the main trade-off? Filtering removes the need for a stable supply A higher duty cycle always reduces the ripple of the filtered output voltage A lower cut-off gives less ripple but a slower response The filter increases the resolution of the PWM None Hint 131). Changing the PWM compare value while the timer runs sometimes produces a malformed pulse. Which hardware feature prevents this? A higher CPU clock that updates the register sooner Compare-register preload (a shadow register) An external capacitor on the output A faster ISR that writes the new value None Hint 132). What is dead time in a half-bridge motor driver? The length of one complete PWM period, measured from edge to edge The time during which the motor is idle between two commands from the controller A software delay that is inserted between two consecutive control commands A short interval during which both transistors are off between switching events None Hint 133). How is two-point calibration applied to an ADC channel? Measure one known input and add a constant offset to every reading afterward Average many readings of an unknown input and use that as the new zero Change the reference voltage repeatedly until all readings agree with a meter Measure two known inputs, compute slope and offset, and apply the correction None Hint 134). A current sensor outputs 2.5 V at zero current and has a sensitivity of 100 mV/A. What current corresponds to 3.0 V? 5 A 2.5 A 0.5 A 30 A None Hint 135). A PWM-driven motor whines audibly at 8 kHz. Which change is typical? Lower the PWM frequency to 100 Hz, so that the whine falls below the audible range B Reduce the duty cycle to zero while the motor is turning, to avoid the noise Raise the PWM frequency above the audible range, accepting higher switching losses Insert delays between PWM cycles to break up the tone and remove the whine None Hint 136). A 3.3 V MCU input is driven directly by a 5 V push-pull output. What should be verified? That the pin supports DMA requests That the pin is specified as 5 V tolerant That the pin has an internal pull-down resistor That the output speed is set to maximum None Hint 137). A fast clock line shows overshoot and ringing. What is a common remedy? A small series resistor close to the driver to damp the reflections A longer trace between driver and receiver, which slows the edges and ends the ringing A pull-up resistor at the receiving end, which stops the line from floating high A larger decoupling capacitor connected directly to the clock line at the driver None Hint 138). Where should a 100 nF decoupling capacitor be placed? On the opposite side of the board, away from the MCU, to avoid coupling Anywhere on the board, because capacitance acts as a lumped quantity at any distance Near the regulator only, so that a single capacitor can serve every supply pin As close as possible to the supply pin, with a short low-inductance path to ground None Hint 139). A high-speed signal trace crosses a split in its reference plane. What is the main problem? The trace resistance rises sharply The signal propagates more slowly in the gap The return current must detour around the gap Nothing, because return current is carried by the supply None Hint 140). Where should ESD protection be placed on an externally exposed connector? Close to the connector, with a short, low-impedance path to chassis or return In firmware only, by retrying the transfers that fail after a discharge event Anywhere along the signal path, because the position of the protection does not matter Next to the MCU, far away from the connector, so the surge is filtered by the board None Hint 141). An MCU resets whenever a relay is switched off. Which component is typically missing? A pull-up resistor on the reset pin of the MCU A flyback diode or snubber across the relay coil A crystal oscillator with a higher accuracy A larger Flash memory for the application code None Hint 142). A linear regulator drops 5 V to 3.3 V at 200 mA. How much power does it dissipate? 1.0 W 0.2 W 0.66 W 0.34 W None Hint 143). A crystal oscillator fails to start after a PCB revision. What should be checked first? The reference voltage that is fed to the ADC converter on the revised board The crystal load capacitors versus its specified load capacitance, and the layout The baud-rate divisor that is used for the debug output of the MCU on this board revision The size of the stack that is reserved for the main task in the linker script None Hint 144). A noisy reset line causes false resets. What helps? A larger pull-down resistor on the reset pin, which keeps the line low until start-up Disabling the reset pin in firmware after start-up, so that noise is ignored A longer reset trace, which acts as a filter for the glitches that are picked up A pull-up with a small capacitor and short routing None Hint 145). A MOSFET gate driven by an MCU pin glitches the load while the MCU is in reset. How can this be avoided? Add a pull-down on the gate, so the default state is off while the pin is high-impedance Increase the PWM frequency of the gate drive, so the transistor switches faster at start Add a pull-up to the gate, so that the transistor is turned on during reset Drive the gate through a larger capacitor, which blocks the glitches during reset None Hint 146). A motor driver and an ADC share a ground return, and the ADC offset changes with motor current. What is the cause? The clock frequency of the ADC, which interferes with the PWM of the motor driver Motor current through the shared ground impedance creates a voltage offset A software overflow in the conversion routine whenever the motor current is high The heat generated by the motor, which shifts the offset of the ADC input None Hint 147). A product fails radiated-emissions testing. Which change may reduce it? Reduce the GPIO slew rate, add series resistors, and shorten current loops Increase the output drive strength of the pins, so that edges are cleaner and shorter Add more debug output to the firmware, to find the emitting routine in the lab Raise the clock frequency of the system, so the energy moves out of the test band None Hint 148). Why is a buck converter preferred over a linear regulator for 12 V to 3.3 V at 500 mA? It needs no external components, so the board becomes smaller and cheaper B. It is always cheaper than a linear regulator, regardless of the load current C. It produces less output ripple than a linear regulator in every operating condition D. Its efficiency is much higher, so far less power is wasted as heat It is always cheaper than a linear regulator, regardless of the load current It produces less output ripple than a linear regulator in every operating condition Its efficiency is much higher, so far less power is wasted as heat None Hint 149). A fault occurs about once in every 1,000 power-ups. How should it be investigated? Test once more and hope that the fault appears while someone is watching the board Increase the Flash size of the device so that the firmware has more room Replace the MCU and test again, since silicon defects are the usual cause of such faults Automate power cycling, log the reset cause, and trigger a scope on the failure None Hint 150). Why can a long ground lead on an oscilloscope probe mislead when measuring a fast edge? Its inductance forms a resonant loop that adds ringing not present on the board It converts the analog signal into a digital waveform before it is displayed It reduces the bandwidth of the scope to zero, so that fast edges cannot be seen It adds a constant DC offset to the signal that is measured at the probe tip None Hint 151). A PID output saturates and its integral term keeps growing. What is this called, and how is it mitigated? Quantization; use an ADC with more bits to resolve the error Integral windup; clamp the integral term or use back-calculation when saturated Derivative kick; add a low-pass filter to the derivative term of the controller Aliasing; raise the sampling rate of the loop to avoid it None Hint 152). A setpoint step causes a large spike in the PID output. Which modification reduces it? Raise the proportional gain, so the error shrinks faster after the step Compute the derivative term on the measurement instead of on the error Sample the loop at a lower rate to smooth the response Remove the integral term, which is the source of the spike None Hint 153). A relay chatters when the temperature hovers around the threshold. What is the fix? Add hysteresis with separate on and off thresholds, or a minimum on/off time Lower the threshold by a few degrees, so that the noise no longer reaches it Use one single threshold and sample the temperature sensor faster than before Switch to a relay with a lower coil voltage rating, so that it moves more slowly None Hint 154). A quadrature encoder reports negative counts when the shaft rotates forward. What is the usual cause? The pull-up resistors on the encoder inputs are missing, so the counts are inverted Channels A and B are swapped, or the decoding direction convention is inverted The baud rate of the encoder interface is configured wrongly in the firmware The index pulse of the encoder is disconnected, so the direction is unknown None 155). A temperature sensor reports a plausible 25 °C when it is disconnected. What should the firmware do? Average it with the previous readings to smooth out the sudden jump in the data Raise the sampling rate, so that the value can be confirmed by more samples Use open-circuit detection (range checks, bias current, redundant channel) Accept the value as it is, because 25 °C is a perfectly plausible reading None Hint 156). Feedback for a position loop arrives over a bus that can time out. What guards against using stale data? Sequence counters or timestamps checked against a freshness limit, with a safe fallback Hold the last received value indefinitely until a new one arrives Reduce the controller gain so the loop reacts less to feedback Average the last few received values to hide the missing updates None Hint 157). A control loop is stable at a 1 ms period but oscillates after a communication task is added. What is the likely cause? The proportional gain is too low Flash wear in the configuration area of the controller Variable sampling period and added delay Noise on the encoder signal None Hint 158). A low-pass filter on the feedback removes noise, but the loop becomes oscillatory. Why? Filters always add gain at the crossover frequency Filters cause aliasing in the ADC Filters change the setpoint The filter adds phase lag and delay None Hint 159). A sensor output sits at the top of its measurement range. What should the firmware report? Report the average of the last ten readings instead Report the maximum value as an exact reading of the quantity A saturation or out-of-range status, rather than an exact-looking value Report zero, so the actuator is always driven to a safe value None Hint 160). Why does a BLDC motor controller need rotor position information (Hall sensors or back-EMF)? Hall sensors supply the electrical power that drives the windings of the motor during start-up They are needed to measure the temperature of the windings during operation They set the PWM frequency that the inverter stage uses for the three phases The controller must energize the right phases for the rotor angle to produce torque None Hint 161). A stepper motor loses steps at high speed. What is the typical cause and remedy? ADC noise in the current sensor The PWM frequency is too low for the encoder The microstepping table has too many entries Available torque falls with speed None Hint 162). Which signal drives a typical hobby servo? A 100 kHz PWM signal with a duty cycle of 90 percent An analog voltage between 0 and 10 V on the control line I²C commands that are sent to the servo once per second A pulse of about 1 to 2 ms repeated every 20 ms (50 Hz) None Hint 163). A load cell reads a nonzero value with no load. What is the usual correction? Raise the amplifier gain, so that the unwanted offset becomes negligible Divide the reading by two, since half of the signal is assumed to be noise Tare calibration: measure the unloaded offset, subtract it, and recheck drift Change the coefficient of the averaging filter until the offset has disappeared None Hint 164). A sensor is specified as ±1 % of full scale with a 0 to 100 range. What is the worst-case error at a reading of 10 units? ±1 unit, because accuracy is specified as a fraction of the full-scale range ±0.01 unit, because the error is 1 percent of the 1 percent figure ±10 units, because the error scales with the full range of 100 units ±0.1 unit, because 1 percent of the 10-unit reading is the error None Hint 165). Which technique combines a drifting gyroscope with a noisy accelerometer to estimate tilt? Average the two sensors with equal weights at every sample, which cancels both of their errors Low-pass filter the gyroscope signal only, which removes its drift completely Use the accelerometer alone together with heavy oversampling to remove its noise A complementary or Kalman filter, trusting the gyro short-term and the accelerometer long-term None Hint 166). How should a firmware update tolerate power loss halfway through? Write to an inactive slot (A/B), verify it, then switch the boot selection atomically Rely on a large capacitor, so the write can always finish after the power is lost Erase the entire Flash first, to guarantee that all sectors are clean when writing Overwrite the running image in place, as quickly as possible, to shorten the risky window None Hint 167). An application located at 0x08008000 faults on its first interrupt. What was probably forgotten? Enabling DMA for the peripheral that raised the interrupt Lowering the system clock before the jump to the application Clearing the .bss section of the application before it starts Setting the vector table offset (VTOR) to the application's vector table None Hint 168). Before jumping from the bootloader to the application, what should the bootloader do? Erase its own code first, to free up Flash space for the growing application image Leave every interrupt enabled, so that the application can use them from the start Jump to the middle of the application image, after the checks confirmed its validity Deinitialize peripherals, load the app's stack pointer, and jump to its reset vector None Hint 169). A downloaded image passes its CRC. What is still unproven? That it fits into the Flash partition that was reserved That it came from the legitimate vendor That its length field is consistent with the data That it is free from random bit errors in transmission None Hint 170). Which mechanism prevents an attacker from installing an old, vulnerable, but validly signed image? Encrypting the image with a stronger cipher before it is sent to the device A larger Flash memory that provides more image slots for older firmware versions A longer CRC polynomial that is applied to the whole firmware image before installation A monotonic security version or counter in tamper-resistant memory, checked at boot None Hint 171). A valid image built for board revision B is installed on a revision A board. What should prevent this? Checking the clock frequency of the target at boot to identify the board Checking the CRC of the image before it is installed, since a wrong board fails it Reducing the image size, so that the same image fits both board revisions Hardware-ID fields in the signed image header, checked before activation None Hint 172). An update packet claims an image length of 600 KB, but the slot holds 512 KB. What should the bootloader do? Reject the transfer before writing, validating lengths with overflow-safe arithmetic Ignore the length field and trust the sender to end the transfer correctly Wrap around and continue writing at the start of the slot, overwriting old data Write data until the slot is full, then stop the transfer and mark the image as valid anyway None Hint 173). What is the purpose of a trial-boot (test) mode in an update scheme? To speed up the first boot after an update The new image must confirm itself after start-up To run the image from RAM only To skip signature verification on the first boot None Hint 174). Flash can be erased only in 128 KB sectors. What is the consequence for the update layout? Every write becomes 128 KB long, so update packets must be padded to that size Erase can be done per byte on all devices, so layouts need no special care Layouts must align to erase boundaries; other data in a sector is lost on erase Nothing changes, because writes and erases are always done byte by byte None Hint 175). How can the active-slot marker be updated safely if power can fail during the write? Write the record twice in quick succession and trust that one of them succeeds Overwrite the single record in place, since a write of a few bytes is always atomic Two redundant records with a sequence number and CRC; pick the newest valid one Keep the marker in RAM only and restore it from the application after each boot None Hint 176). Firmware runs from the debugger but not after a cold power-up. What is a likely reason? Optimization settings are silently changed by the programmer Debuggers corrupt the Flash contents after programming The power supplies differ in their rating and tolerance The debugger initializes registers or alters startup timing None Hint 177). Why include sequence numbers in a serial update protocol? They encrypt the data while it is in transit over the serial link They compress the image, which reduces the time needed for the transfer Duplicate or reordered packets after retransmission are detected, not written twice They make the transfer faster by allowing the sender to use much larger frames on the link None Hint 178). What is the main trade-off of delta (differential) updates? No verification of the result is needed, because the patch itself is signed Much smaller downloads, but the exact base version is needed and patching adds risk No Flash is needed on the target for the update, since patches run from RAM Larger downloads, but fewer integrity checks are needed since the base is known None Hint 179). Why are the bootloader's Flash sectors write-protected? To free RAM that the application would otherwise need for its own buffers To enable DMA access to the bootloader region from the application code To speed up booting, since integrity checks can be skipped on protected sectors To prevent application bugs or malware from corrupting the recovery path None Hint 180). How can a bootloader be entered on demand without a hardware button? The application changes the baud rate of the debug port The application erases its own header so that the bootloader runs at the next reset C. The application writes a magic value into a no-init RAM location and resets D. The application disables interrupts and halts forever TThe application writes a magic value into a no-init RAM location and resets The application disables interrupts and halts forever None Hint 181). With the data cache enabled, DMA writes a buffer, but the CPU reads old data. What is needed? Declare the buffer volatile, so that the compiler re-reads it on every access Add more wait states to the memory interface so the cache can keep up Disable DMA for that peripheral and copy the data with the CPU instead Invalidate the buffer's cache lines before the CPU reads it (and clean before DMA reads) None Hint 182). Why should DMA buffers be aligned and sized to the cache-line length (for example 32 bytes)? Caches require even-sized buffers Cache maintenance acts on whole linesx DMA cannot access odd addresses It makes the transfer faster by itself None Hint 183). What do linked-list (scatter-gather) DMA descriptors allow? Converting between different data formats automatically during each transfer of the buffer Encrypting the data while it is transferred between peripheral and memory Chaining several transfers with different addresses and lengths without CPU intervention Running the DMA controller at a higher clock rate than the CPU can supply None Hint 184). How does double-buffered (ping-pong) DMA help a continuous ADC stream? It doubles the sampling rate of the ADC, because two buffers fill in parallel It removes the need for any DMA interrupts, because the CPU polls the buffers The CPU processes one half while DMA fills the other half It removes the noise from the samples by averaging the two buffer halves None Hint 185). A task reuses a buffer right after starting a DMA transmit, and the output is corrupted. Which rule was broken? The buffer must be a local variable, so that it is freed when the call returns The buffer must be declared const, so that the DMA controller can read it safely The buffer must not be modified until transfer-complete is signaled The buffer must be declared volatile, so that it is reloaded before DMA starts None Hint 186). A ring buffer with head == tail cannot tell whether it is full or empty. How is this resolved? Treat head equal to tail as always empty Compare head and tail with a greater-than test Keep a count or flag, or leave one slot unused Treat head equal to tail as always full None Hint 187). A configuration record is rewritten every second at the same Flash page. What is the problem and a fix? Bit rot inside the page buffer, which a CRC would detect and repair Retention; keep the device cooler to preserve the page contents longer Speed; use a faster clock so that the write finishes before the next one Erase endurance (typically 10 thousand to 100 thousand cycles) None Hint 188). How can a record write be made robust against power loss? Write the data first and the validity marker last, keep the old copy, verify on read Add a capacitor to the supply and skip the validation of the stored data Write the record as fast as possible, since a short write window cannot be interrupted Disable all interrupts during the write, so that the data is stored atomically None Hint 189). A struct written directly into Flash is read by a newer firmware version, and the fields are shifted. What went wrong, and what is the remedy? The memory layout (padding, field order, size) changed Flash lost some bits during the update, which changed the stored values The byte order of the struct changed when the compiler was upgraded The cache corrupted the struct while the new firmware was starting up None Hint 190). Why can a Flash word not simply be overwritten with a new arbitrary value? Programming can only change bits from 1 to 0 The new value must first be copied to RAM The value must be encrypted before writing Flash is read-only after the first write None Hint 191). Why is CRC-32 usually preferred over a simple additive checksum for stored data? It is always faster to compute than a sum, on any processor and for any buffer length It detects burst errors and swapped bytes that a simple sum would miss It is smaller than any other checksum that can be used It can correct single bit errors in the stored data None Hint 192). What does ECC on RAM or Flash provide beyond simple parity? Single-bit errors are corrected and double-bit errors are detected It encrypts the stored data, so that a stolen device does not reveal its contents It detects nothing but address errors on the bus between CPU and memory It doubles the usable capacity of the memory by compressing the stored words None Hint 193). Which conditions most reduce the data retention time of Flash cells? Long periods that the device spends in sleep mode with the supply on Low temperature combined with only a few program/erase cycles of the cells High temperature and a high number of previous program/erase cycles Frequent interrupts during operation, which disturb the stored charge None Hint 194). Why can an MCU stall while Flash is being erased, if the code runs from the same Flash bank? The Flash controller cannot serve instruction fetches while it erases or programs that bank The CPU enters a lower power state automatically while the erase is active The prefetch buffer is cleared by the erase command and must be refilled The erase operation switches off the CPU clock until the sector is finished None Hint 195). A DMA channel stops after a bus error, and the application waits forever for the transfer-complete interrupt. What should the firmware do? Disable the transfer-complete interrupt and poll the destination buffer for new data instead Rely on the watchdog alone to restart the whole system whenever a transfer does not complete in time Raise the DMA channel priority so that bus errors can no longer occur during transfers Handle the DMA transfer-error interrupt, check the error flags, and abort or re-arm the transfer None Hint 196). A node draws 5 mA for 100 ms every second and 10 µA for the rest of the time. What is its approximate average current? About 5 mA About 0.05 mA About 0.51 mA About 2.5 mA None Hint 197). A device sleeps at 2 µA, yet its battery lasts only weeks. Which factors outside the MCU should be checked? Regulator quiescent current and board leakage during sleep The instruction set of the CPU core that runs the application The tick rate that the RTOS kernel is configured to use in sleep The version of the compiler that built the firmware for the product None Hint 198). A battery gauge based on terminal voltage shows the wrong charge when the load changes. What is a better method? Average 100 voltage readings per second before computing the charge Use a larger battery with a higher capacity for the application Measure the battery voltage with a faster and more precise ADC Coulomb counting, with periodic voltage-based correction None Hint 199). What is the trade-off between a deep-sleep mode and a light-sleep mode? There is no trade-off, since both modes retain the same state Light sleep uses less current than deep sleep on every device Deep sleep wakes up faster than light sleep on every device Deep sleep draws less but loses more state and wakes more slowly None Hint 200). An MCU never wakes from deep sleep on a pin interrupt. What is a likely cause? The ADC was not calibrated before the MCU entered sleep The Flash size is too small for the wake-up handler code that the MCU must execute The pin is not enabled as a wake-up source for that low-power mode The baud rate is set too high for the wake-up event None Hint 201). A GPIO left high feeds current into an unpowered sensor. What is this effect and what is the risk? A latch-up in the MCU that was triggered by the software Electrical noise that is generated by the idle pin Back-powering through the sensor's input protection diodes D. A clock overload on the output driver of the pin A clock overload on the output driver of the pin None Hint 202). A radio dominates the energy budget. Which firmware measure helps most? Batch data and transmit less often, when latency requirements permit Add more debug logging to the firmware for each measurement so the problem can be seen Increase the CPU clock, so that processing finishes sooner Lower the ADC resolution to save conversion time None Hint 203). Resets occur only during radio transmission on a coin cell. Why? The radio frequency is too high for the coin cell chemistry The stack is too small for the radio driver The Flash memory is worn out and draws extra current Battery internal resistance causes a voltage droop under peak current None Hint 204). How can both microamp sleep current and milliamp active bursts be measured in one run? A handheld multimeter set to its 10 A range during the whole run Counting the executed instructions in the debugger during the run A current profiler with wide dynamic range and fast sampling A scope probe attached to the USB data lines of the board None Hint 205). What does the "race to sleep" strategy mean? Run the CPU as slowly as possible for as long as possible, which minimizes the power drawn Never enter any sleep mode at all, so the device avoids the energy cost of waking up Sleep immediately without finishing any pending work, and let the next wake-up complete it Complete the work quickly, possibly at higher clock speed, and return to deepest sleep None Hint 206). A sensor needs 10 ms to stabilize after power-up. How should power be saved without invalid readings? Lower its supply voltage at random to reduce its energy use Sample immediately after power-up to save the waiting time Power it only when needed via a load switch, and wait for its start-up Keep it powered permanently so it is always stable and ready whenever a sample is needed None Hint 207). Why is a 32.768 kHz watch crystal commonly used for the RTC in low-power designs? It provides the highest possible clock for the CPU core of the device It improves the accuracy of the ADC conversions in sleep mode It keeps time at very low power while the main clock is off It is required by every UART peripheral to generate baud rates None Hint 208). Why is busy polling a poor choice in a battery-powered design? The CPU stays active, whereas an interrupt or event lets it sleep until work arrives Interrupts consume more power than polling in all of the sleep modes Polling needs more Flash than an interrupt handler for the same task Polling cannot read the state of GPIO pins on this class of device None Hint 209). Measured sleep current is high while the debugger is connected. What is the usual cause? The RTC is running from the 32 kHz crystal during the test The stack pointer is misaligned at the entry to sleep The debug domain stays powered and clocked in sleep The compiler optimization level that was chosen for the build None Hint 210). Which feature matters for a boost converter that spends most time at very light load? A higher fixed switching frequency for the converter output stage A burst (pulse-skipping) mode and low quiescent current A bigger inductor with no change of the control mode A larger output capacitor only, with the same control mode None Hint 211). What must a 12 V ECU tolerate during engine cranking? Supply dips to about 6 V for tens of milliseconds A supply voltage that doubles for a short time during starting A completely stable supply, since cranking has no effect on it Only 3.3 V logic levels on all of its interfaces None Hint None 212). What is a load dump? A software function that clears the memory of the ECU after a crash or a power failure A CAN wake-up event that is sent to all nodes on the network A low-voltage condition that occurs while the vehicle is parked A transient of 40 V or more when the battery is disconnected under charge None Hint 213). In AUTOSAR Classic, what does the RTE (Runtime Environment) do? It links application components with the basic software It compiles the application code for the target processor It is a hardware block inside the MCU that routes the signals It schedules only the interrupt vectors of the operating system None Hint 214). Which UDS service reads a data identifier, for example the VIN? DiagnosticSessionControl (0x10) WriteDataByIdentifier (0x2E) SecurityAccess (0x27) ReadDataByIdentifier (0x22) None Hint 215). What is the purpose of the UDS SecurityAccess service (0x27)? To reset the ECU after a diagnostic session has ended B A seed-and-key challenge that unlocks protected services To encrypt all CAN traffic between the tester and the ECU To read the stored fault codes from the ECU memory None Hint 216). What is DTC debouncing or confirmation? A fault must persist or recur over a counter or time before the DTC is stored Erasing old fault codes from memory after each trip of the vehicle Encrypting the diagnostic data before it leaves the ECU Prioritizing the DTCs on the bus so that urgent ones are sent first None Hint 217). What does end-to-end (E2E) protection add to safety-related CAN signals? An alive counter and CRC to detect corruption, loss or repetition A higher bit rate that is used for the important messages only Priority arbitration among the nodes that send the messages Encryption of the payload, so that nobody can read the signal values None Hint 218). A DBC signal has factor 0.1 and offset -40, with an 8-bit raw value of 150. What is the physical value? -40 -25 110 15 None Hint 219). Why does ISO-TP (ISO 15765-2) exist? To wake the network up when a tester is connected To split messages longer than 8 bytes into several CAN frames To synchronize the clocks of all the ECUs on the network To encrypt the diagnostic messages that cross the network between tester and ECU None Hint 220). Why do ECUs implement network management with sleep and wake-up? To synchronize the clocks of all the ECUs in the vehicle To prioritize the important messages on the network To keep a parked vehicle's quiescent current low yet allow wake-up To increase the cranking performance of the starter motor None Hint 221). Why does an accelerator pedal use two sensors with different, for example inverse, characteristics? It runs faster than a single sensor in the pedal assembly Comparing them reveals faults, including shorts between the tracks It doubles the resolution of the pedal position measurement It is cheaper than using two identical sensors in the pedal assembly of the vehicle None Hint 222). What is XCP used for in automotive development? Waking the network up when the ignition key is turned Updating the firmware of the ECU over the CAN or Ethernet link Encrypting the diagnostic traffic between tester and ECU Measuring and calibrating ECU variables while the software runs None Hint 223). What does AEC-Q100 Grade 1 indicate? Resistance of the IC against radiation in space Compliance with the highest safety integrity level, ASIL D An automotive-qualified IC for -40 °C to +125 °C ambient A consumer part for the temperature range 0 °C to 70 °C None Hint 224). In an OSEK or AUTOSAR OS, what is an alarm typically used for? Playing a warning sound when a fault has been detected Activating a task or event when a counter reaches a value Setting the interrupt priorities of the peripherals of the ECU Allocating memory for the tasks of the operating system None Hint 225). What are freeze-frame data in vehicle diagnostics? A snapshot of operating conditions stored when a DTC is set A single frame that is transmitted on the CAN bus A video recording of the vehicle when the fault was set A complete copy of the firmware at the time of the fault, stored in the ECU memory None Hint 226). What does a device tree do? Compiles the user-space applications for the target processor of the board Schedules the kernel threads on the cores that are available Provides a run-time library that all applications link against Describes the board's hardware to the kernel (addresses, interrupts, pins) None Hint 227). A user program cannot open /dev/i2c-1. What are typical checks? i2c-dev must be loaded, the bus enabled, and the user permitted Whether the DNS configuration of the network interface is correct How much heap memory is still available to the calling process Which scheduling priority the calling task has been given None Hint 228). Why is the sysfs GPIO interface (/sys/class/gpio) discouraged? It is much faster than the character-device interface for toggling pins It requires a reboot after each change of a pin direction It is not supported on any current board or any current kernel It is deprecated in favor of the libgpiod character-device interface None Hint 229). When is ioctl() used in a character driver? To read the continuous data stream that the device delivers For device-specific control operations outside the read/write stream To load kernel modules into the running system To allocate memory inside the kernel for the device buffers None Hint 230). Why implement a driver in the kernel rather than in user space? User space has no permission to access any device on a Linux system Interrupts and DMA often need kernel facilities for latency and protection Kernel code is easier to debug than user-space code on every system Kernel code is always faster than any user-space code that does the same job None Hint 231). A kernel interrupt handler must do long processing. What mechanism is appropriate? A threaded IRQ or a bottom half (workqueue), after a short top half A longer top half that finishes all of the processing inside the hard interrupt context Sleeping inside the hard IRQ context until the slow device finishes its operation Disabling preemption on the CPU for the whole duration of the processing None Hint 232). A control thread must meet a 1 ms deadline on Linux. What helps? Setting nice -20 for the thread and leaving everything else unchanged Calling sleep() in the loop so that other threads can run Lowering the CPU clock to reduce the interference from other tasks PREEMPT_RT, SCHED_FIFO priority, mlockall and CPU isolation None Hint 233). Why use UIO or a proper driver instead of mmap'ing /dev/mem? /dev/mem is slower than UIO for register access on every board UIO is not supported by the mainline Linux kernel /dev/mem is unrestricted raw access; UIO restricts and structures it /dev/mem needs no root privileges to be opened by an application running on the board None Hint 234). How do Yocto and Buildroot differ? Buildroot requires a package manager to be installed on the target They are identical tools that only differ in their names Yocto builds a customizable distribution; Buildroot builds a small root filesystem Yocto always generates smaller images than Buildroot for the same board None Hint 235). What is the typical boot sequence of an embedded Linux system? Init, kernel, bootloader, then the ROM code of the SoC Kernel, ROM code, bootloader, then init and the root filesystem of the system ROM code, then U-Boot, then the kernel with its device tree, then init Bootloader, init, device tree, then the ROM code of the SoC None Hint 236). How can a Linux gateway be protected against filesystem corruption on abrupt power loss? Read-only root with an overlay for writable data and power-fail-safe storage Increase the size of the swap partition on the storage device Write the logs more often to the disk, so that less data is lost Disable the file system synchronization to reduce the number of writes None Hint 237). How can boot time be analyzed on a systemd-based Linux system? Running the top command repeatedly after the boot has finished Counting the number of devices that are declared in the device tree Measuring the size of the kernel image that was built for the board and its device tree systemd-analyze, which shows each unit's time and the critical chain None Hint 238). What does the devm_* family of functions provide in a platform driver? Faster memory allocation than the plain kmalloc() function Additional locking for the data that is shared Resources that are released automatically on probe failure or removal Extra debugging output that is printed by the driver None Hint 239). Why use the DMA API (for example dma_alloc_coherent()) rather than a plain kmalloc() address for a device buffer? It allocates the memory from the general kernel heap It returns memory with a valid bus address and handles coherency It only adds extra debugging checks to the allocation It is faster than every other allocation function in the kernel, so drivers always use it None Hint 240). What must a driver do in its suspend and resume callbacks? Reboot the device after each resume Save and restore device state, clocks and interrupts Nothing, because the kernel handles everything Delete the device node when suspending None Hint 241). A driver passes tests with typical sensor values but fails at the maximum ADC reading. Which technique would have found this? Increasing the number of random tests at midrange values only Testing only with the most typical values that occur in normal use Boundary-value testing at and just beyond the limits Running the same set of tests at a lower clock speed None Hint 242). Which coverage criterion do functional-safety standards typically require for the highest integrity levels? Function coverage of all the functions in the module Line coverage of at least fifty percent of the code The number of source files that were executed MC/DC (modified condition/decision coverage) None Hint 243). A timing bug disappears when debug logging is enabled. What does this suggest? The hardware is defective and fails randomly The logging changed the timing and hides a race or deadline problem The compiler is faulty and generates wrong code The bug is fixed by the logging, so the code can ship once the logging stays enabled None Hint 244). What is hardware-in-the-loop (HIL) testing? Testing the hardware in a climate chamber under stress Reviewing the schematic of the board with the design team Running the real controller hardware against a simulated plant Testing only the software on a PC without any hardware None Hint 245). How can driver code be unit-tested on a PC although it accesses hardware registers? Remove the driver from the build used for testing Run the tests only on the final hardware, with a real device attached Put register access behind an abstraction layer and mock it in tests Declare all registers volatile in the test build None Hint 246). How would a team verify that a driver handles a missing sensor correctly? Review the driver code in a meeting and note all the error paths that exist in it Unplug the sensor and watch whether the system happens to crash Fault injection: simulate timeouts, corrupt frames or missing devices Test only the path in which the sensor works correctly None Hint 247). What is the purpose of applying MISRA C guidelines together with static analysis? To replace dynamic testing on the real hardware To enforce a safer language subset and find defects statically To reduce the size of the binary that is produced To make the code run faster on the target processor None Hint 248). What advantage does ETM or SWO trace have over breakpoints? It records execution history without stopping the running system It stops the CPU at every instruction that is executed, so the whole history can be displayed It works without any debug hardware being attached It increases the CPU clock while the trace is recorded None Hint 249). When is a logic analyzer preferable to an oscilloscope? For measuring the RF power of a radio transmitter For decoding digital protocols across many channels For measuring analog noise on a power supply rail For checking mechanical vibration of the board None Hint 250). Why embed a build identifier (version and source revision) in every firmware image? It makes the binary smaller by compressing the code that is stored in Flash Field failures can be traced to exact source and test results It speeds up booting by skipping some checks It encrypts the firmware against copying None Hint 251). What is the benefit of running automated regression tests on target hardware in CI? Target-specific failures are caught on every commit Host tests become unnecessary in every case after that Build times shrink because the target does the compiling The code no longer needs a review before the merge None Hint 252). A test fails occasionally because it checks a peripheral after a fixed 100 ms delay. What is a better approach? Run the test twice and report the better of the two results Remove the check from the test, because the delay already covers the start-up Wait for an observable ready condition with a bounded timeout Increase the delay to one full second so that the device is always ready None Hint 253). Which compiler options help catch implicit narrowing and sign conversions? -O3 -fno-inline, which expose conversion problems at run time -ffast-math -funroll-loops, which flag unsafe conversions -Wall -Wextra -Wconversion, ideally with warnings treated as errors -g3 -Wl,-Map=out.map, which report narrowing in the linker map None Hint 254). What does fuzz testing add for a protocol parser? Faster parsing of the messages that arrive from the field Mutated inputs reveal crashes and bounds errors tests miss Mathematical proof that the parser is correct for all inputs Lower memory use of the parser code in the final image None Hint 255). Memory is occasionally corrupted at a known address, and the culprit is unknown. Which debugger feature helps? Reading the heap size at the end of the run A breakpoint on main() that is set before the system starts to run Single-stepping through the code from the reset A data watchpoint that halts on a write to the address None Hint 256). What do ASIL levels in ISO 26262 express? The speed of the CAN bus that connects the ECUs in the vehicle Required rigor of safety measures from A (lowest) to D (highest) The operating temperature range that the device is rated for The size limits of the memory that is available in the ECU None Hint 257). What is a safe state? A state in which no tasks are running on the processor A defined condition, such as outputs off, entered after a fault The state of the system after a successful boot has completed and all tasks have started The state in which the system draws the lowest power None Hint 258). Two redundant sensor channels share the same supply and connector. What risk remains? A common-cause failure can disable both channels at once Both sensors will always read exactly the same value C. Nothing, because redundancy removes all risk D. The sensors will draw less current Both sensors will always read exactly the same value Nothing, because redundancy removes all risk D. The sensors will draw less current None Hint 259). What does diagnostic coverage describe? The percentage of the sensors that are redundant The fraction of dangerous failures that a safety mechanism detects The fraction of the code lines that are executed in the tests of the safety function The fraction of the time during which the system is powered None Hint 260). A watchdog is refreshed from a periodic timer ISR, even when the main application is deadlocked. What is the flaw? The refresh does not depend on the monitored tasks making progress ISRs cannot access the watchdog registers of the MCU The watchdog proves that all the tasks are running correctly The watchdog must be serviced from the UART interrupt None Hint 261). Why is an external watchdog often preferred over the MCU's internal one in safety designs? It needs no software at all to operate It has an independent clock and reset path It is cheaper to buy than an internal watchdog It runs at a higher clock rate than the MCU None Hint 262). What does FTTI (fault tolerant time interval) specify? The duration of one complete test run of the safety function The timeout value that is configured for the watchdog in the MCU The time between two consecutive software releases of the product in the field Maximum time from fault to hazard; detection and reaction fit within it None Hint 263). Why run a march test of RAM at start-up? It detects stuck-at and coupling faults in memory cells It speeds up the boot process of the system It increases the amount of RAM that can be used It erases sensitive data from the memory before use None Hint . 264). How do lockstep CPU cores detect faults? The cores share a common clock to stay synchronized Two cores run the same code and a comparator flags mismatches The cores exchange encrypted messages to verify the identity of each other at start-up One core runs at double speed to check the other core None Hint 265). What does a 2-out-of-3 voting architecture do? It halves the cost of the system compared with a single channel Three channels vote, and the majority masks one failure It requires three different operating systems on the channels It uses two channels and one spare that is switched off None Hint 266). A product uses a safety-certified MCU. Is the product therefore functionally safe? Yes, since the certification covers the whole product Only if the MCU runs at more than 100 MHz Yes, as long as the firmware compiles without errors No; the system needs its own safety lifecycle and verification None Hint 267). Why is traceability required in safety projects? It reduces the compile time of the project when the requirements change It links requirements to design, tests and results It replaces the testing of the system It makes the code smaller in the end None Hint 268). What should be ensured about an actuator output while the MCU is in reset? It floats freely until the firmware sets it The firmware sets it before the reset happens Hardware biasing keeps it in the safe state It is driven by the debugger during the reset None Hint 269). What is program-flow monitoring (logical monitoring)? Checkpoints verify that code runs in the expected sequence and time Counting the lines of code that were executed in the test Measuring the temperature of the CPU while running Tracing the usage of the stack of each task None Hint 270). What is the difference between SIL and ASIL? They are identical and interchangeable SIL is a hardware ID and ASIL a software ID SIL comes from IEC 61508 for general industrial systems SIL applies only to software and ASIL only to hardware components of a system None Hint None 271). An MQTT device publishes with QoS 1 and sometimes receives duplicate deliveries. Why? The broker has too little memory QoS 1 guarantees exactly-once delivery, so duplicates indicate a bug QoS 1 guarantees at-least-once delivery The TCP stack retransmits at the application level None Hint 272). What do MQTT retained messages and Last Will messages provide? Retained messages give new subscribers the last value immediately Faster publishing of messages by the device to the broker Encryption of the topic names that are stored on the broker Larger payload limits for every message on the broker None Hint 273). A fleet of devices reconnects simultaneously after a server outage. What reduces the reconnection storm? Exponential back-off with random jitter, and sensible retry limits Retrying every second until the server finally answers the request Opening several parallel connections to the server per device Reconnecting all devices at exactly the same moment after the outage None Hint 274). A queued "open valve" command arrives hours late after the device reconnects. How should the system protect against acting on it? Execute every queued command in the order of its arrival at the device Increase the maximum queue size that is configured on the broker Reduce the MQTT keep-alive interval that is used by the client Attach a timestamp or expiry to commands and discard expired ones None Hint 275). Why should an IoT payload carry a schema or version number? It speeds up the radio of the device by selecting a faster modulation B. Mixed firmware versions can interpret fields correctly during staged rollouts C. It compresses the message, which reduces the airtime on the radio link of the device D. It encrypts the message, so that nobody on the path can read it Mixed firmware versions can interpret fields correctly during staged rollouts It compresses the message, which reduces the airtime on the radio link of the device It encrypts the message, so that nobody on the path can read it None Hint 276). How does the BLE connection interval affect the system? It has no effect on power, only on the range Longer intervals increase throughput and also the power use Longer intervals save power but add latency; shorter ones do the reverse It affects only the advertising range of the device None Hint 277). When is BLE advertising used instead of a connected GATT link? For synchronizing the clocks of two devices For streaming large files to a phone at a high rate For encrypted firmware updates only, and never for sensor data of any kind For small, infrequent broadcasts without a connection, to save power None Hint 278). A Wi-Fi device is connected but cannot reach its cloud endpoint. What is a sensible troubleshooting order? Check IP and gateway, then DNS and firewall, then TLS, then the endpoint Replace the antenna of the device immediately and check the signal strength Check TLS first, then the power supply, and last of all the router Reflash the firmware with the previous version and reconnect to the network None Hint 279). A wireless sensor has poor range despite a fast MCU. What should be checked? The amount of Flash that is available for the radio stack The CPU clock of the MCU that runs the radio protocol stack The tick rate of the RTOS that runs the radio stack Antenna design, enclosure effects, interference and radio settings None Hint 280). In LoRaWAN, what does a higher spreading factor do? It increases the range and the data rate together, with shorter airtime per frame It reduces both the range and the airtime of each transmitted frame It has no effect on the airtime of a frame, only on the receiver sensitivity It increases range and robustness but reduces data rate and increases airtime None Hint 281). Why is CoAP often chosen over HTTP for constrained devices? It requires no network at all It runs over TCP with a larger header It runs over UDP with a compact binary header It cannot be secured with any protocol, so it is limited to private networks None Hint 282). A device fails TLS certificate validation after a power loss, and its clock reads 1970. What is the cause? The certificate is too long to be stored on the constrained device The negotiated cipher suite is not supported by the server The server is temporarily down for maintenance at that moment Certificate validity periods are checked against the device's time None Hint 283). Why is a compact binary encoding such as CBOR or Protocol Buffers often used instead of JSON on constrained links? They are always encrypted by default They are human-readable on the wire Payloads are smaller and cheaper to parse They need no schema on either side None Hint 284). A device loses connectivity but must retain critical events. What storage approach is suitable? Dropping all the events that occur while the link is offline An unbounded queue in the RAM of the device that keeps growing until the memory is full Sending each event twice as soon as the link comes back A bounded persistent queue with an overflow policy and integrity protection None Hint 285). What advantage does a mesh network such as Thread or Zigbee offer? No need for any routing nodes or coordinators in the network Lower latency than a direct radio link between two nodes Nodes relay messages over several hops and reroute around failures Higher throughput than any star network can offer at the same range None Hint 286). What is a chain of trust in secure boot? The application verifies the bootloader after it started Every stage verifies its own code before it runs Each stage is encrypted with the same password Each stage verifies the next, starting from an immutable root of trust None Hint 287). Why is authenticated encryption (such as AES-GCM) preferred over encryption alone for commands? It is faster than any other mode of operation of the cipher on all processors Encryption alone keeps data secret but allows undetected modification It needs no key to be configured on the device in advance It makes the data smaller before it is sent over the link None Hint 288). Why should each device have a unique key or credential? Unique keys are shorter than shared keys Compromising one unit then does not expose the whole fleet It avoids the need for provisioning at the factory It speeds up the cryptography on the device None Hint 289). A production device ships with its debug port enabled. Why is this a risk? It affects only the clock tree of the device Debug ports cannot be disabled on any production MCU An attacker can read memory, extract secrets or alter firmware It increases the power use of the device, and nothing else is affected by it None Hint 290). What is the danger of reusing a nonce with the same key in AES-GCM or CTR mode? Nothing happens, since nonces are optional in these cipher modes It can reveal the XOR of plaintexts and, in GCM, the authentication key It increases the key length that is needed for the same security It only slows the cipher down a little, without a security impact None Hint 291). Why should session keys come from a hardware random-number generator rather than rand()? A TRNG uses less power than any software generator rand() is predictable, whereas a TRNG or seeded CSPRNG is not rand() produces fewer bits per call than a TRNG rand() is slower than a hardware generator in every case, so it is avoided None Hint 292). An attacker records a valid unlock command and replays it later. Which protection helps? A stronger encryption algorithm that is used alone A longer command that is harder for an attacker to guess Include a nonce, counter or timestamp in the authenticated message A faster bus that makes recording the traffic impossible None Hint 293). A TLS client validates the certificate chain but not the server's hostname. What is the risk? The certificate will expire sooner than it was planned It may accept a valid certificate that belongs to a different server The negotiated cipher will be weaker than expected The connection will be slower than it would be oth None Hint 294). Where should long-term device keys be stored? In a secure element, TrustZone secure world or protected key storage In a plain text file on the root file system of the device In the firmware image, next to the code that uses it In an unprotected external EEPROM on the board None Hint 295). Why must MAC or signature comparisons run in constant time? It is required by the C standard for all comparisons It saves memory in the code of the crypto library Constant time is faster than a normal comparison of two values of the same length A comparison that stops at the first mismatch leaks timing information None Hint 296). How does making RAM non-executable (using the MPU) help against buffer-overflow attacks? Injected data cannot be run as code It increases the stack size It encrypts the stack It prevents overflows from occurring None Hint 297). Why must authentication tokens and keys never appear in debug logs? Logs are widely accessible and keep secrets long after use They make the log files larger than they need to be Tokens are too short to be of any use in a log It slows down the output of the logging subsystem None Hint 298). A device authenticates the user but lets that user change safety-critical settings without restriction. What is missing? A stronger password for each user account on the device, changed every few months Encryption of the stored settings in the device A faster login procedure for all of the users Authorization: permissions decide which actions an identified user may take None Hint 299). Why maintain a software bill of materials (SBOM) for firmware? It replaces the code review process It reduces the image size of the firmware It lists third-party components and versions It speeds up the build of the firmware None Hint 300). Which countermeasure helps against voltage or clock glitching attacks on a bootloader? A slower UART for the update port of the device Redundant checks, random delays and glitch detectors A larger Flash memory for the second image slot A longer password for the bootloader of the device and a lockout after three tries None Hint 301). What is the value of 0xFF in decimal? 255 256 128 127 None Hint 302). How is -1 stored in an 8-bit signed variable on a normal two's complement machine? 0x80 0x81 0xFF 0x01 None Hint 303). Which expression tells you that a positive integer n is a power of two? (n % 2) == 0 (n ^ 1) == 0 (n & (n - 1)) == 0 (n | (n - 1)) == 0 None Hint 304). What does this code do on a typical microcontroller? int *p = NULL; *p = 5; It creates a new variable named p at address 5 It is undefined behavior; it may fault or silently write to address 0 It always stops with a compile error It is always safe, because writes through NULL are ignored None Hint 305). What does char *const p mean? The pointer cannot be changed, but the data it points to can The pointer may only ever point to constant string literals The data cannot be changed, but the pointer itself can be moved Neither the pointer nor the data it points to can be changed None Hint 306). What does the keyword static do on a global variable or function? It makes the object live on the stack It makes it visible to every source file in the project It sets the initial value to a random number It limits its visibility to the source file that contains it None Hint 307). What does extern int count; do? It makes count a constant that no other file is allowed to modify It declares a variable that is defined in another file, without creating it here It allocates four bytes of RAM for count in the file where it is written It hides the variable count from the linker so no other file can see it None Hint 308). What is the purpose of include guards such as #ifndef MY_H in a header file? To encrypt the header contents inside the object file To stop the header from being processed twice in one translation unit To make the linker run faster when many source files are used To keep the header private to the developer who wrote it None Hint 309). After int i = 5; int j = i++ + 1; what are the values of i and j? i = 5 and j = 7 i = 5 and j = 6 i = 6 and j = 6 i = 6 and j = 7 None Hint 310). What does sizeof(char) evaluate to in C? 2 1 4 8 None Hint 311). What does this code store in f? float f = 7 / 2; 3.0, because the division is done on integers first 4.0, because the result is rounded up 0.0, because 7 is smaller than 2 times 4 3.5, because the result is converted to float first None Hint 312). What does typedef do? It creates a new name for an existing type It defines a numeric constant It includes another source file It reserves memory for a new variable None Hint 313). How many bytes does uint32_t arr[10]; occupy? 20 32 40 10 None Hint 314). What happens with int a[5]; a[5] = 1;? It writes the last valid element of the array It makes the compiler resize the array to six elements It writes past the end of the array, which is undefined behavior It always stops the program with an error message None Hint 315). What does if (x = 0) do? It is always rejected by the compiler It sets x to 1 and runs the block It assigns 0 to x, and the condition is always false It compares x with 0 and runs the block when they are equal None Hint 316). What happens in a switch statement when a case has no break? Only the default case is executed afterwards Execution falls through and continues into the next case The compiler reports an error for the missing break The switch stops, because every case ends automatically None Hint 317). What does x It rotates x by three bits It divides x by 8 It multiplies x by 8 It multiplies x by 3 None Hint 318). What do these three lines do? a ^= b; b ^= a; a ^= b; They swap the values of a and b without a temporary variable They copy the value of a into b and keep a as it was They set both a and b to zero because the XOR cancels out They leave a and b unchanged because the steps undo each other None Hint 319). What does strlen("Hi") return? 2 4 1 3 None Hint 320). What does 10 % 3 evaluate to in C? 1 0.33 3 0 None Hint 321). A new board runs your code, but the LED on a pin never lights. The code writes a 1 to the output register. What is a simple thing to check first? That the compiler is set to little-endian That the Flash has been erased twice That the stack is larger than 1 KB That the pin was configured as an output None Hint 322). An LED is toggled every millisecond and looks as if it is simply on at half brightness. Why? It blinks at 500 Hz, which is too fast for the eye to see as flashing The timer runs at half of its programmed speed in this mode The compiler has removed the toggle instruction from the program The LED is damaged and can only work at half of its normal current None Hint 323). A counter increases by hundreds when a button is pressed once, because the code runs if (pressed) count++; in a fast loop. What is the cleanest fix? Move the counter to a global variable that is shared with the main loop Act only on the change from released to pressed, not on the pressed level Give the loop a higher priority so that it runs less often per press Make the counter variable volatile so the compiler keeps updating it None Hint 324). A character LCD shows random blocks right after power-up, but works after a reset. What is a likely reason? The firmware must send the text twice so that the display can sync The LCD cannot handle the default clock speed that the MCU provides The controller needs a power-up wait and a defined initialization sequence The display needs a different font file to be loaded at start None Hint 325). A serial terminal shows nothing at all from a new board, although the firmware is sending text. The baud rate is correct. What is a common wiring mistake? The USB cable is too thick to carry the serial data reliably The terminal program is using a dark theme on that computer The ground wire between the board and the adapter is too short TX of the board is connected to TX of the adapter instead of to its RX None Hint 326). printf("Temperature: ") without a newline prints nothing on the terminal until much later. What is the likely cause? printf only works after the first interrupt has occurred Output is line-buffered, so it is held until a newline or a flush The terminal ignores any text that does not contain a colon The UART drops every text line that does not contain a number None Hint 327). An ADC channel with nothing connected shows values that drift between 800 and 2000. Why? The ADC is broken and must be replaced on the board The converter is counting the cycles of the CPU clock The reference voltage of the ADC is stuck at zero, so every channel returns random codes The input is floating and picks up noise and charge from its surroundings None Hint 328). An I²C bus works with one temperature sensor, but fails when a second sensor of the same type is added. What is the most likely cause? The second sensor needs its own separate clock signal line The pull-up resistors double their value with two devices I²C cannot have more than one sensor on the bus at a time Both devices have the same address, so they answer at the same time None Hint 329). A brand-new SPI Flash chip is read, and every byte returns 0xFF. What is the most plausible explanation? The chip is defective, because a working chip would read 0x00 The chip is blank, because an erased Flash cell reads as all ones The SPI clock is exactly twice as fast as the chip allows The chip stores the value 0xFF only while in factory test mode None Hint 330). After wiring a brushed DC motor, it turns the wrong way. What is the simplest correction? Replace the MCU with a faster model of the same family Swap the two motor wires or invert the direction signal in software Add a larger capacitor across the supply of the motor Double the PWM frequency that is used to drive the motor None Hint 331). A board works on the bench supply, but resets when running from a nearly empty battery pack that still measures 3.5 V. The regulator outputs 3.3 V. What should be checked? Whether the firmware was compiled in release mode The font size and color scheme of the debug output on the connected terminal window The length of the USB cable that powers the board The regulator's dropout voltage and whether the battery holds up under load None Hint 332). A temperature sensor on a board reads 4 °C higher than a reference thermometer, and the offset is stable. What is a typical physical cause? The sensor has too many bits of resolution The ADC reference is too accurate for this type of sensor Heat from a nearby regulator or processor warms the sensor The firmware prints decimal numbers instead of integers None Hint 333). In the debugger, a local variable shows . What does this usually mean? The variable has an invalid name that the debugger cannot read, so it hides the value The debugger has run out of memory for showing local variables The compiler kept the value in a register or removed it, since optimization is on The variable has been deleted from the source file by the debugger None Hint 334). A battery-powered device works in the office, but often fails when it is used outdoors in winter. What is a likely cause? Cold air increases the CPU clock speed and the power drawn The firmware does not run in cold weather by design The Flash content shrinks when the temperature is low A cold battery has less capacity and higher internal resistance None Hint 335). A GPS module works well on the roof but never gets a position fix on a desk inside a building. Why? The module needs Wi-Fi to know the time The module is in sleep mode every time it is indoors GPS only works in daylight The satellite signals are weak and need a clear view of the sky None Hint 360. A board with a 2.4 GHz-only Wi-Fi chip does not connect to the office network. The router has a network named "Office-5G". What is the probable reason? That network is on the 5 GHz band, which the chip does not support The chip needs a USB cable plugged in to be able to connect Wi-Fi networks can only be joined without a password The network name is too short to be accepted by the chip None Hint 337. [Mid] After a firmware update, the debugger can no longer connect ("target not detected"), although the board powers up. What may have happened? The debugger cable has become shorter and no longer reaches the board The firmware is too small to be accepted by the debugger The new firmware reconfigured the SWD pins or sleeps at once, so the debugger loses access The compiler has removed the debug interface code from the image, so the probe cannot attach None Hint 338). uint32_t big = 3000000000; printf("%d", big); prints a negative number on a PC. What is wrong? The terminal cannot show numbers above one million, so it prints the wrapped value The variable is stored in the wrong byte order inside the RAM The format specifier does not match the argument type; use %u, %lu or PRIu32 printf can only print values that are 16 bits wide None Hint 339). An LED is driven by PWM, and doubling the duty cycle from 10 % to 20 % hardly looks twice as bright. Why? The PWM counter is only 4 bits wide on this type of timer, so the steps are coarse The duty cycle can only be changed in steps of 50 percent Perceived brightness is not linear, so a gamma table is used for smooth dimming LEDs always have a logarithmic power supply built in None Hint 340). An RTC-based clock on a product loses about 20 seconds per month. What is the usual cause? The RTC counts in decimal, and loses a little at every rounding of the second tick The accuracy of the 32.768 kHz crystal, given in ppm, and its temperature drift The date is stored as text in RAM and is rewritten slowly The interrupt controller skips one second every day None Hint 341). An LED needs 10 mA and has a 2.0 V forward drop. It is driven from 3.3 V. Which series resistor value is correct? 130 Ω 1.3 kΩ 330 Ω 13 Ω None Hint 342). How much power does a 100 Ω resistor dissipate when 0.1 A flows through it? 0.1 W 100 W 1 W 10 W None Hint 343). What is the time constant of an RC circuit with R = 10 kΩ and C = 100 nF? 10 ms 100 µs 1 µs 1 ms None Hint 344). What does the continuity mode of a multimeter tell you? The exact capacitance of a wire that is under test The temperature of a component that is touched by the two probes of the multimeter The frequency of a signal that is applied between the two probes Whether a low-resistance path exists between two points, usually with a beep None Hint 345). How must a multimeter be connected to measure the current of a circuit? In series with the circuit, so the current flows through the meter In parallel with the supply, like a voltmeter across the battery Only to the ground wire of the scope, never to the circuit Across the load, so the voltage drop is measured first None Hint 346). What is the cost of using a series diode to protect a board against reversed supply polarity? A voltage drop of the diode (about 0.3 V Schottky, 0.7 V silicon) and some power loss It makes the whole board run at a slower clock speed It stores energy that is released to the load again at the next power-up of the whole board It doubles the supply voltage that is seen by the board None Hint 347). Why can a GPIO pin usually not drive a motor directly? Motors need a CPU clock that is above 100 MHz to be driven A pin supplies only a few to tens of milliamps, much less than a motor needs GPIO pins always output the wrong polarity for a motor A motor can only be driven by analog voltages, not by logic levels None Hint 348). What is an optocoupler used for? To transfer a signal between two circuits with electrical isolation To store a logic signal in a non-volatile memory cell To amplify the weak signal of an antenna before it is used To measure the temperature of an LED in the circuit None Hint 349). What is the main difference between JTAG and SWD for debugging an ARM Cortex-M? JTAG cannot read memory, while SWD can read and write it SWD needs two signal lines plus ground, while JTAG needs at least four SWD works only on 8-bit devices, while JTAG works on 32-bit ones SWD is a wireless interface, while JTAG needs a cable None Hint 350). Why can a 3.3 V UART pin of an MCU not be connected directly to an RS-232 port of an old PC? RS-232 uses the same voltage levels as the MCU, so only the baud rate needs to be changed RS-232 can be driven only with a clock that is above 1 MHz An RS-232 port has no ground wire, so it cannot be connected RS-232 uses about ±3 V to ±15 V, so a level converter such as a MAX3232 is needed None Hint 351). Two boards are connected with a signal wire, but the signal is unreliable. Which connection is missing? A common ground between the two boards A capacitor between the two supplies A resistor to the 5 V rail on both boards A second signal wire in parallel None Hint 352). Two 3.7 V Li-ion cells of 2000 mAh each are connected in series. What is the result? 7.4 V with a capacity of 4000 mAh 3.7 V with a capacity of 4000 mAh 3.7 V with a capacity of 1000 mAh 7.4 V with a capacity of 2000 mAh None Hint 353). What can happen if an electrolytic capacitor is connected with reversed polarity? It doubles its capacitance It can heat up, vent or even burst It acts as a diode in the circuit Nothing, since capacitors have no polarity None Hint 354). A resistor has the colour bands brown, black, red, gold. What is its value? 10 Ω with 5 % tolerance 100 kΩ with 5 % tolerance 1 kΩ with 5 % tolerance 1 kΩ with 10 % tolerance None Hint 355). What does a resettable fuse (PTC polyfuse) at the input of a board do? It stores charge that is released to the board at the next start It filters the high-frequency noise that is present on the supply rail of the whole board It raises its resistance when the current is too high and recovers after cooling It raises the supply voltage whenever the voltage drops too low None Hint 356). Why are power traces on a PCB made wider than signal traces? Wide traces reduce the number of layers that are needed It has a lower resistance, so it carries more current with less heating and drop Wide traces make signals travel faster than narrow ones do, so fast signals use them Narrow traces cannot carry any voltage at all None Hint 357). Why do designers add test points on a prototype board? To increase the size of the Flash memory that is available to the debugger software To shield the board against radiation from outside To add extra memory that is used only for debugging \To give a place for probes or meters on key signals without damaging the board None Hint 358). What does a 10x oscilloscope probe do? It measures ten channels at the same time on a single probe It amplifies the signal ten times so that small voltages show better It attenuates the signal by 10 but loads the circuit less than a 1x probe It makes the scope ten times faster at capturing the signal None Hint 359). What is the period of an 8 MHz clock? 8 ns 8 µs 12.5 ns 125 ns None Hint 360). Why is a resistor placed in series with the base of a bipolar transistor used as a switch? To remove the need for a collector connection in the circuit To limit the base current to a safe value that still saturates the transistor To turn the transistor into a diode whenever the base voltage becomes high enough To let the transistor conduct current in both directions None Hint 361). What is a task in an RTOS? A file that is stored in the Flash memory of the device and run by the loader A voltage level on one of the pins of the MCU An independent unit of execution with its own stack, priority and state A single hardware register that is used by the scheduler None Hint 362). What happens during a context switch? The Flash is erased and rewritten with the code of the next task each time it is run All variables of the old task are copied into the heap The registers of the running task are saved and those of the next task are restored The processor clock is switched over to another clock source None Hint 363). What does the idle task do in an RTOS? It checks the Flash for errors and repairs them while the system is idle It runs when no other task is ready, often to enter a low-power mode It always runs at the highest priority in the system It deletes the tasks that have finished their work None Hint 364). What is the difference between a hard and a soft real-time system? A hard system uses a metal case, while a soft system is made of plastic x A hard system always runs faster than any soft system A soft system has no deadlines at all, even loose ones In hard systems a missed deadline is a failure; in so None Hint 365). What is the RTOS tick? A command of the debugger that steps through the code A button on the evaluation board that is used by the tester to start a test run A periodic timer interrupt that the kernel uses for time-keeping and scheduling A single byte of memory that holds the current task number None Hint 366). When is a counting semaphore a good choice? It must count how many identical resources, such as free buffers, are available The priorities of two tasks must be swapped Only a single task may be allowed to access the resource A task needs to send a short text message to another task as a command or reply None Hint 367). What does it mean when a task is in the Blocked state? It is waiting for an event, a timeout or a resource, and is not using CPU time It has crashed and is deleted from the scheduler list It is the task with the lowest priority in the system It is running on the second core of the processor at the same time as another task None Hint 368). What is a memory leak? Memory that is allocated and never released, so free memory slowly runs out A write to the wrong address that corrupts a variable Data that is lost when the power of the device goes off A single bit flip in RAM tha None Hint 369). What is the main difference between a thread and a process? Threads of one process share an address space; processes have separate ones B. A process always runs faster than a thread, because it does not share memory C. Threads cannot have priorities, but processes can D. A process has no stack, while a thread has one A process always runs faster than a thread, because it does not share memory Threads cannot have priorities, but processes can A process has no stack, while a thread has one None Hint 370). What is the job of the linker? It converts the C source code into assembly code It writes the final image into the Flash memory of the MCU through the debugger It checks the source code against the style rules It combines object files and libraries into one image and resolves the symbols None Hint 371). What does a Makefile do? It programs the Flash of the MCU through the USB port It describes how to build the project and rebuilds only the files that changed It compresses the source code before it is compiled It stores the version numbers of the firmware in the Flash and prints them at boot None Hint 372). What is a cross-compiler? A compiler that runs only on the target board itself A compiler that runs on one computer type but produces code for another processor A tool that compares two versions of the same source code A compiler that converts one programming language into another, for example C to Java None Hint 373). What is a branch in Git? An independent line of development that can later be merged An option that is passed to the compiler A comment that is written in the source code A backup copy of the whole hard disk of the developer None Hint 374). What is the main purpose of a code review? To measure how fast each developer can type code To reduce the file size of the finished firmware To find defects early and share knowledge in the team To replace all of the testing that is done later None Hint 375). What does an integration test check? That the schematic is correct and complete That several modules work correctly together, not only on their own That the code compiles without any warnings That a single function returns the correct value on its own None Hint 376). In version 2.5.1 under semantic versioning, which part changes if a change breaks compatibility? The last number (patch), so 2.5.2 None of the numbers The first number (major), so 3.0.0 The middle number (minor), so 2.6.0 None Hint 377). What is a hardware abstraction layer (HAL)? A tool that is used to measure signals on the bus A hardware chip that stores the layout of the board and its component placement A special type of layer in the PCB stack-up A software layer that hides register details behind a simple interface None Hint 378). What is an interrupt vector table? A list of all of the GPIO pins of the device A table with the priorities of all the tasks A list of all the variables that are stored in RAM A table of addresses of the interrupt and exception handlers None Hint 379). What is a callback function? A function that is stored in a separate memory chip A function that calls itself again and again until the recursion has finished A function whose address is passed on to be called when an event happens A function that always returns control to main() None Hint 380). Why should a "magic number" such as if (x > 4242) be avoided in code? Its meaning is unclear and hard to change, so a named constant is better The compiler cannot compile numbers that are above 1000 in the middle of a condition It makes the program run noticeably slower The C standard does not allow such numbers None Hint 381). Which interface needs the fewest signal wires between an MCU and a sensor (ignoring ground and power)? SPI with one slave, with four lines Parallel bus, with eight lines I²C, with two lines (SDA and SCL) CAN, with four lines None Hint 382). How many bytes per second can a UART at 115200 baud with 8N1 format send at most? About 11,520 bytes About 1,152 bytes About 14,400 bytes About 115,200 bytes None Hint 383). What is a parity bit used for? Increasing the baud rate automatically when the line is quiet for a while Counting the number of frames that were sent Encrypting the data so that nobody can read it Simple detection of a single flipped bit in a transmitted word None Hint 384). What are the start and stop bits of a UART frame for? They tell the receiver the name of the sender They carry the checksum of the data bytes in the frame, so it can be checked They select the baud rate that is used on the line They mark where each frame starts and ends, so no shared clock is needed None Hint 385). Which statement is correct about UART and I²C? Both interfaces are full duplex, with separate lines each UART is full duplex with separate TX and RX; I²C shares one data line I²C is full duplex and UART is half duplex Both interfaces are simplex and send data in one direction None Hint 386). What is the difference between a MAC address and an IP address? An IP address is burned into the network chip at the factory and can never be changed They are two names for exactly the same number A MAC address changes automatically every minute A MAC address names the interface on the local link; an IP address names the host None Hint 387). What does DHCP do? It automatically gives a device an IP address and other network settings It encrypts the Wi-Fi traffic between the device and the router with a key It measures the speed of the network connection It converts a web name into the matching IP address None Hint 388). Which messages make up the TCP three-way handshake? SYN, SYN-ACK and ACK HELLO, OK and BYE START, DATA and STOP GET, POST and PUT None Hint 389). Which TCP port is normally used for HTTPS? 25 443 80 21 None Hint 390). What is the main advantage of Bluetooth Low Energy over Bluetooth Classic? A longer cable length between the devices Support for wired connections to a computer Higher data rate for streaming music to a headset Much lower power use for small, occasional data transfers None Hint 391). What is the typical range of NFC? About 10 meters A few centimeters About 100 meters Several kilometers None Hint 392). How does a passive RFID tag get its power? From a small solar cell that is built into the tag From a coin cell that is placed inside the tag From the Wi-Fi router that is in the room From the field of the reader, so the tag needs no battery None Hint 393). A battery-powered meter must send a few bytes a day from a building basement over a wide area. Which type of network fits best? A 5 GHz Wi-Fi network with a router Bluetooth Classic with a speaker profile Gigabit Ethernet over a long cable, which gives the highest data rate A low-power wide-area network such as NB-IoT, LTE-M or LoRaWAN None Hint 394). What is the 1-Wire interface known for? It is used only for the transfer of audio data One data line plus ground, and sensors like the DS18B20 can take power from it It needs a separate data wire for each of the connected sensors on the same board It uses a wire that is exactly one meter long None Hint 395). What is the I²S interface mainly used for? Sending digital audio samples between chips Programming the Flash memory of the MCU Reading the values of temperature sensors Connecting a mouse to a computer None Hint 396). On most SPI devices, how is the chip-select signal active? Active high only, so the device is selected when the pin is pulled to the supply Active low, so the device is selected when the pin is pulled to ground Active at every rising edge of the clock It has no fixed active level and depends on the chip None Hint 397). What is the role of a USB host compared with a USB device? The host can only receive data, never send it There is no difference between the host and the device The host controls the bus and supplies power; the device answers its requests The device always controls the bus and supplies power, and the host only listens None Hint 398). What is the maximum cable length for 100 Mbit/s Ethernet over Cat5e twisted pair? 10 km 10 m 1 km 100 m None Hint 399). What is the difference between latency and throughput of a link? Latency is the delay of one message; throughput is the data per second Latency is the data rate and throughput is the delay They are two names for the same value of a link Latency is measured in bytes and throughput in volts, so they differ only in units None Hint 400). What is a packet in a network? A single bit on the wire A small unit of data with a header (addresses, control) and a payload A kind of network switch in a rack A type of cable that is used to connect two network switches in a large rack None Hint Mastering embedded systems requires more than memorizing technical definitions. Successful embedded engineers must understand how hardware, firmware, real-time constraints, communication protocols, memory, power consumption, and system reliability work together in real-world applications.This collection of 400 embedded systems MCQs with answers and solutions provides a practical resource for interview preparation, technical assessments, skill development, and revision of essential embedded engineering concepts. From Embedded C and microcontroller programming to RTOS debugging, functional safety, cybersecurity, and system optimization, these questions cover many of the challenges engineers encounter during embedded product development.For the best results, attempt each question independently, study the explanation, and practice implementing the concepts on a real development board whenever possible. Pay particular attention to debugging scenarios, timing constraints, concurrency problems, and fault-recovery strategies, as these skills are especially valuable in professional firmware engineering.Keep practicing, build hands-on projects, and strengthen your understanding of both hardware and software. With consistent preparation, you can improve your technical confidence and prepare more effectively for embedded systems interviews and real-world engineering responsibilities. Bookmark this guide for future revision and share it with fellow embedded engineers preparing for interviews. Time's up