Top 100 Embedded Software Engineer Practice MCQs
Every question on one page: open one, choose an answer, and see why at once. Signed in, your latest answer to each question counts, and you can answer again after 24 hours.
Curated: · Written: · Reviewed: —
This collection is currently unranked practice while editorial review is pending.
MCQ-1A Cortex-M4 driver polls `*(uint32_t *)0x40021000` for its READY bit at `-O2`, but the loop never exits after hardware sets the bit. The register is memory-mapped and changes without a store from the CPU. What declaration makes each iteration perform a fresh hardware read?
Answer to see the discussion.
MCQ-2A Cortex-M7 CPU polls a cacheable Ethernet DMA receive buffer while DMA writes a new frame, then reads it after DMA completes but sees the previous frame. What cache maintenance, applied to that buffer, fixes the final read?
Answer to see the discussion.
MCQ-3A receive task on a 16 KB RAM microcontroller has a 2 KB stack with no heap configured, and must hold a 4 KB packet inside `receive_packet`, called only by that task. Where should the buffer be allocated?
Answer to see the discussion.
MCQ-4A Cortex-M0 firmware parses packets in a byte buffer at `0x20000101` by casting to `uint32_t*` and loading a word, and the device resets from a HardFault with the stacked PC at that load. What change removes the fault while keeping the parsed value?
Answer to see the discussion.
MCQ-5A task on an 8-bit MCU computes elapsed time from a 32-bit `tick` incremented by the SysTick ISR every millisecond. Occasionally it reads a value far from the current time, with high bytes from one increment and low bytes from another. What should the task do when reading `tick`?
Answer to see the discussion.
MCQ-6Two tasks share one I2C bus in FreeRTOS. Task A acquires the bus lock for its transfer, the same task must release it afterwards, and no other task may release it. Which release arrangement enforces that ownership?
Answer to see the discussion.
MCQ-7A FreeRTOS system has a high-priority control task blocked on a mutex held by a low-priority logging task while it flushes a buffer to an SD card, and a medium-priority telemetry task repeatedly preempts the logging task. The mutex was created without priority inheritance enabled. What change bounds the blocking time for the control task?
Answer to see the discussion.
MCQ-8A Cortex-M4 RTOS task switches on `PSP` while its ISRs run on `MSP`. Its worst-case call chain needs 720 bytes, nested ISRs can use 480 bytes, and RAM allows at most 800 bytes for this task stack. What task stack allocation fits both the call depth and the RAM limit?
Answer to see the discussion.
MCQ-9A sensor ISR produces samples into a 16-slot ring buffer while a task consumes them, using only `head` and `tail` indices with no count variable. When `head` equals `tail`, the producer stops adding samples and the consumer waits for data, so the pipeline stalls. What change distinguishes full from empty in this pipeline?
Answer to see the discussion.
MCQ-10A sensor on a long I2C trace shows ringing on SDA and SCL at every transition. Which bus speed setting best reduces the ringing?
Answer to see the discussion.
MCQ-11A Cortex-M4 board drives two independent 320x240 displays over 30 cm cables, each needing a 20 MHz clock for full-frame refresh, with only two spare GPIOs and displays that are not daisy-chainable. Which bus and chip-select arrangement meets the throughput requirement?
Answer to see the discussion.
MCQ-12A sensor node and a gateway communicate at `115200 8N1` over UART. The node uses its internal RC oscillator, specified at ±2% over temperature, and framing errors appear only below -20°C and above 70°C, while room-temperature links are clean. What change most directly removes the drift source?
Answer to see the discussion.
MCQ-13A Cortex-M4 button on `PA0` triggers a falling-edge GPIO interrupt, but the switch bounces for about 5 ms and the ISR must return within 10 us. The main loop already runs a 1 ms periodic task. Which debounce design fits these constraints?
Answer to see the discussion.
MCQ-14A UART driver must initialize its receive buffer and state before handling bytes. What is the standard rule for enabling the UART receive interrupt in relation to that initialization?
Answer to see the discussion.
MCQ-15A Cortex-M4 UART uses a level-sensitive interrupt. During init, with interrupts disabled, its status flag and NVIC pending bit are both set but `DR` holds no byte. Which clearing sequence before enabling prevents a spurious ISR entry?
Answer to see the discussion.
MCQ-16A Cortex-M7 firmware declares `dma_buf` with `section(".dma_buffer")`, and the script maps that section to `MEM_B`, cacheable AXI SRAM at `0x20000000`, while DMA reads the buffer directly from memory and sees stale data. The script also defines `MEM_A`, non-cacheable SRAM at `0x30000000`, and `MEM_C`, flash. Which linker script change places `dma_buf` in non-cacheable SRAM?
Answer to see the discussion.
MCQ-17A Cortex-M4 linker script ends `.text` at `0x0800F000` in flash and places `.data` VMA at `0x20000000` in RAM, with `.bss` after `.data` in RAM. Startup code copies `.data` from its LMA to its VMA, but the script sets that LMA inside `.text`, and the bootloader requires a contiguous flash image with no gap after `.text`. What LMA should `.data` use so its 32-byte initial image follows `.text` in flash?
Answer to see the discussion.
MCQ-18A bootloader computes a CRC over the stored firmware image and finds it differs from the stored CRC value. What should the bootloader do before any jump to the application?
Answer to see the discussion.
MCQ-19A Cortex-M4 device runs v2 from slot A while v3 is staged in slot B with a valid CRC and signature. The bootloader must trial v3 on the next boot, but v3 crashes in early init before its self-test sets the confirmed flag. What slot policy returns the device to v2 without reflashing?
Answer to see the discussion.
MCQ-20A Cortex-M4 firmware stores a sensor config pointer `cfg` at `0x20001040`. Intermittently `cfg` changes to a RAM address and the next `*cfg = value` corrupts unrelated data. The team needs the instruction that changes `cfg`, not the later crash site. What SWD setup catches that write?
Answer to see the discussion.
MCQ-21A Cortex-M4 firmware HardFaults in thread mode, and its handler dumps the exception frame from `MSP` with stacked `PC=0x08001235` and stacked `LR=0x08002345`. Disassembly shows a load at the even address below the stacked `PC`. Which stacked value, adjusted for Thumb state, points at the faulting instruction?
Answer to see the discussion.
MCQ-22A Cortex-M control loop in a field unit misses its deadline intermittently and needs a timestamp per iteration without halting the core. Only a single-wire SWO probe is connected, with no TPIU connector available. Which trace setup captures the timestamps?
Answer to see the discussion.
MCQ-23A motor controller runs its 1 ms current loop in a timer ISR that keeps running when the main loop deadlocks on a bus wait, while the main loop completes comms and diagnostics every 20 ms. A runaway main loop can also spin without doing that work. Which watchdog arrangement detects both failures?
Answer to see the discussion.
MCQ-24An STM32F4 sensor node sleeps in STOP mode and must wake every 10 seconds from its RTC wakeup timer, not its RTC alarm. The RTC wakeup interrupt is enabled, yet the node never wakes from STOP. Which EXTI routing must be configured before entering STOP with `WFI`?
Answer to see the discussion.
MCQ-25A sensor node draws 40 mA while awake for 100 ms, then sleeps at 10 uA for the remainder of each 10 s wake cycle. What is its average current over a full cycle?
Answer to see the discussion.
MCQ-26A Cortex-M SoC ROM bootloader loads a second-stage bootloader whose public key is embedded in its header. The device's OTP eFuses hold only a hash of that public key, not the key itself. What comparison must the ROM bootloader perform before trusting that key to verify the second-stage signature?
Answer to see the discussion.
MCQ-27A gateway runs confirmed v7 and stages signed v8 in slot B for a trial boot, where v8 may crash before its self-confirmation and power can fail at any point. After v8 confirms, replayed signed v7 must be rejected, but after a failed trial the device must still fall back to v7. Which confirmed-counter policy achieves both?
Answer to see the discussion.
MCQ-28A SIL 3 motor controller must pass a MISRA C:2012 audit, and its packet handler calls `malloc` for each variable-length frame with no upper bound and an unchecked return. Which memory change should the team make for compliance?
Answer to see the discussion.
MCQ-29A Cortex-M0 PID loop without an FPU stores its output in an `int16_t` and must represent 1.35, from error 0.9 times gain 1.5, with resolution finer than 0.0001. Which fixed-point format for the output meets both requirements?
Answer to see the discussion.
MCQ-30A sensor datasheet timing diagram shows SCLK resting high between SPI transfers. Which clock polarity setting should the driver use for this sensor?
Answer to see the discussion.
MCQ-31A sensor holds `SCL` low for 12 ms after its address ACK while an ADC conversion runs, and its datasheet says `STOP` during the stretch aborts the conversion. The master timeout is wall-clock based and its hardware counter saturates at 5 ms, and a control ISR must keep running during conversion. What master behaviour reads the sample correctly?
Answer to see the discussion.
MCQ-32A Cortex-M4 UART at `115200 8N1` sets `ORE` when its ISR is delayed, and the next frame begins with `0xAA` after an idle gap. The ISR must recover without losing synchronization. What clearing sequence should it perform?
Answer to see the discussion.
MCQ-33A Cortex-M4 DMA engine transfers full 320x240 frames to a display controller that latches each received frame at its own frame sync halfway through the next DMA transfer. DMA automatically alternates between two frame buffers and restarts immediately at transfer-complete, and rendering one frame takes less than one transfer. Which interrupt should switch the rendering buffer?
Answer to see the discussion.
MCQ-34A Cortex-M safety ISR must preempt a telemetry ISR, and telemetry must never preempt safety. Which NVIC priority setting gives safety that preemption ability?
Answer to see the discussion.
MCQ-35A 500 kbit/s CAN bus shares one FIFO transmit queue feeding a single hardware transmit buffer. A high-priority safety task queues an 8-byte `0x100` frame every 10 ms, a low-priority logging task queues 8-byte `0x700` frames that must not be dropped, and a medium-priority telemetry task queues continuously. The safety frame sometimes misses its deadline. What queue discipline prevents this inversion?
Answer to see the discussion.
MCQ-36A Cortex-M4 sensor ISR is the sole producer into a 256-slot ring buffer and a task is the sole consumer. The ISR writes `buf[head]` then advances `head`; the task snapshots `head`, reads `buf[tail]`, then advances `tail`, with no lock. Which ownership rule makes this lock-free design safe?
Answer to see the discussion.
MCQ-37A Cortex-M4 task has a 2048-byte stack filled with `0xA5` at startup, a canary at the stack limit, and an idle task that scans the fill pattern every 100 ms. After a week the canary has never tripped, but the scan consistently finds only 96 bytes of untouched pattern at peak depth. What should the team do?
Answer to see the discussion.
MCQ-38A battery-powered RTOS node must run for years without rebooting, and its queues are created once at startup. Which allocation for queue storage avoids heap fragmentation over that uptime?
Answer to see the discussion.
MCQ-39A gateway with a 64 KB heap runs for six weeks before `malloc(512)` starts returning NULL, while total free heap stays near 18 KB and the largest contiguous block is 96 bytes. Workloads allocate and free many variable-sized buffers out of order, with no growth in live allocations. What diagnosis explains the failures?
Answer to see the discussion.
MCQ-40A driver reads a 32-bit status register as a `uint32_t` in host order, where bits 0-3 hold status, bits 4-7 hold error, bits 8-15 hold count, and bit 31 holds ready. It must build unchanged with two compilers that allocate bitfields differently and on little- and big-endian targets. Which decoding approach is portable across those builds?
Answer to see the discussion.
MCQ-41A Cortex-M4 drives a four-phase stepper on `PA0`-`PA3`, while other pins on the same port drive LEDs that must stay unchanged. The step changes from `0b0011` to `0b1100`, and any intermediate pattern would energise the wrong coils. Which single register write updates all four phases atomically?
Answer to see the discussion.
MCQ-42A timer input capture channel must measure the high pulse width of a PWM signal for duty-cycle calculation. Which capture mode timestamps both edges of that pulse?
Answer to see the discussion.
MCQ-43A Cortex-M4 samples a 12-bit ADC at 10 kHz into circular DMA for FFT analysis, with a timer clocked at 84 MHz, prescaler set to zero, and its update event triggering conversions. Which auto-reload value gives the required fixed sampling rate?
Answer to see the discussion.
MCQ-44A 12-bit ADC uses a nominal 3.3 V reference with ±2% tolerance to measure a steady 1.65 V input. Averaging 64 samples makes the noise negligible, yet the mean stays consistently low by about 60 mV. Which calibration action corrects the averaged reading?
Answer to see the discussion.
MCQ-45A battery sensor node talks to a crystal-clocked gateway at `115200 8N1` using its internal RC oscillator. At 25°C the link is clean, but at -35°C the RC frequency drifts 3.5% high and framing errors appear on most frames. What clock change most directly restores reliable reception at low temperature?
Answer to see the discussion.
MCQ-46On this board EXTI0 is wired to the supply monitor and fires when VDD falls below 2.7 V, roughly 15 ms before the 2.4 V reset. Firmware must preserve 64 bytes of config in flash across that reset. Which handler should write the config to flash?
Answer to see the discussion.
MCQ-47A PMIC sequencer brings up PLL, core, DDR and IO rails for an SoC at -40°C, where one rail needs 9 ms to reach PG. Firmware uses IO, DDR, core, PLL with 2 ms fixed delays and no PG checks; units latch up, PLL lock fails when core ramps first, and DDR training fails before core PG. What sequencing change fixes all three failures?
Answer to see the discussion.
MCQ-48A battery sensor node busy-waits between ADC samples at full clock, draining its battery, while its MCU can enter STOP and be woken by a low-power timer. What should firmware do during the sampling interval to cut average current?
Answer to see the discussion.
MCQ-49A single-master I2C bus writes to a sensor, and the logic analyzer shows `START`, the address byte, no ACK bit, then `STOP`, with SDA and SCL idle high afterwards. What does that trace indicate about the failure?
Answer to see the discussion.
MCQ-50A Cortex-M4 node receives custom serial frames with a trailing CRC-16. The receiver must decide whether a frame's payload was corrupted in transit before acting on it. What check should the receiver perform on each frame?
Answer to see the discussion.
MCQ-51A CAN controller is clocked at 48 MHz and must run at 500 kbit/s with an 87.5% sample point and at least 2 TQ of synchronisation jump width. The hardware allows at most 20 TQ per bit and requires SJW no larger than BS2. Which prescaler and segment lengths satisfy every constraint?
Answer to see the discussion.
MCQ-52A vehicle CAN node at 500 kbit/s sees repeated bit errors from a shorted transceiver, its transmit error counter passes 255, and the controller enters bus-off and stops transmitting while other nodes keep communicating. Firmware must recover without resetting the MCU, but must not rejoin while the fault persists. What recovery sequence should it follow?
Answer to see the discussion.
MCQ-53An ADC streams at 10 kHz via DMA circular mode into a 256-sample ring buffer. The consumer task sleeps on a semaphore signalled by the half-transfer interrupt, its processing takes several milliseconds and must not block other ISRs, and each half must finish before the next half completes. What should the firmware do on that interrupt?
Answer to see the discussion.
MCQ-54A DMA channel streams samples continuously into a buffer while a task processes it, and the next transfer can start before processing finishes. Which arrangement prevents overwriting while keeping the stream continuous?
Answer to see the discussion.
MCQ-55A Cortex-M4 at `168 MHz` must service a peripheral that asserts data-ready every `10 us`, and each service only reads one status register and clears the flag. The peripheral exposes only that flag, with no DMA request line or FIFO, the main loop has no other work during the burst, and interrupt entry plus exit costs more than the register read itself. What should firmware do during the burst?
Answer to see the discussion.
MCQ-56A Cortex-M4 safety ISR at the highest priority must respond within 50 us. Tasks disable interrupts for 30 us and 12 us, while lower-priority ISRs run for 80 us and 20 us. What is the worst-case latency for the safety ISR?
Answer to see the discussion.
MCQ-57A Cortex-M4 low-priority timer ISR updates a 32-bit `elapsed` with two 16-bit writes, while a higher-priority UART ISR reads `elapsed` to timestamp received bytes. The timer ISR currently tries to take a mutex shared with a task before those writes. What should replace the mutex inside the timer ISR?
Answer to see the discussion.
MCQ-58A sensor ISR finishes a conversion and must wake a waiting task once, without blocking. Which primitive should the ISR signal?
Answer to see the discussion.
MCQ-59A Cortex-M4 FreeRTOS `spi_read()` uses one shared SPI bus and static TX buffer, called by a 10 ms control task and a 1 kHz timer ISR that must return within 50 us. Preemption mid-transfer corrupts frames. What handling prevents corruption without blocking the ISR?
Answer to see the discussion.
MCQ-60A Cortex-M4 task polls a `volatile uint8_t busy` flag that a timer ISR clears when a peripheral is ready, and the task must claim it exactly once before starting a transfer. A plain check-then-set occasionally lets the ISR clear the flag between the check and the write, while the ISR must still respond within 20 us. Which claim mechanism should the task use?
Answer to see the discussion.
MCQ-61A fixed-priority RTOS runs `fast` (10 ms period, 2 ms WCET), `mid` (20 ms period, 4 ms WCET) and `slow` (50 ms period, 8 ms WCET) with `slow` highest priority, `mid` next and `fast` lowest. Total utilization is 0.56, below the three-task RMA bound of 0.78, yet `fast` intermittently misses its 10 ms deadline. What priority assignment fixes the schedule?
Answer to see the discussion.
MCQ-62An RTOS runs four equal-priority sensor tasks that are always ready and must each receive CPU time regularly. Which scheduling policy guarantees none of them starves?
Answer to see the discussion.
MCQ-63A Cortex-M4 motor controller must start its current loop within 10 us of each 1 ms tick, computation takes 300 to 700 us, and a comms ISR can preempt for 200 us. A rare fault can stretch one computation to 1.4 ms. Which timing structure keeps phase lock without back-to-back catch-up runs after that overrun?
Answer to see the discussion.
MCQ-64A Cortex-M4 RTOS periodic task has a 10 ms period and normally runs 2 ms, but occasionally runs 12 ms or starts 3 ms late and runs 8 ms. Firmware must detect and log each missed release without delaying the next invocation. What check should it perform?
Answer to see the discussion.
MCQ-65A battery RTOS node wakes for 50 ms every 10 s to sample a sensor, with all task timeouts needing 10 ms resolution and no sub-millisecond deadline. Between samples every task blocks for seconds. Which tick configuration meets the timeouts while allowing deep sleep?
Answer to see the discussion.
MCQ-66A FreeRTOS startup task must proceed only after sensor, radio, and storage initialization each set their own event-group bit. Which `xEventGroupWaitBits` setting makes the task wait for every completion flag?
Answer to see the discussion.
MCQ-67A Cortex-M4 timer ISR at 1 kHz must wake a single consumer task to process the latest ADC reading, and the task must know how many ISR firings occurred since it last ran even when several fire while it is blocked. RAM is tight, the ISR cannot block, and only the latest reading matters. Which signalling mechanism fits this producer-consumer pair?
Answer to see the discussion.
MCQ-68Task `sensor` locks `bus_mutex` then `log_mutex`, while `logger` locks `log_mutex` then `bus_mutex`, and both hang. Vendor `diag` locks `bus_mutex` then `log_mutex` and cannot change, `logger` holds `log_mutex` for a 200 ms SD flush, a started bus transfer cannot be aborted, and a 1 kHz ISR must run within 50 us. What change removes the deadlock without breaking those constraints?
Answer to see the discussion.
MCQ-69A Cortex-M4 RTOS node uses a 500 ms independent watchdog with a dedicated watchdog task. A sensor task and a comms task each set a heartbeat flag per cycle, and the watchdog task feeds only after both flags were set since its previous run. The comms task deadlocks on a bus lock while the sensor task continues normally. What is the expected outcome?
Answer to see the discussion.
MCQ-70A Cortex-M4 HardFault handler reads the fault registers and finds `BFSR` nonzero while `UFSR` is zero. Which fault category does this indicate?
Answer to see the discussion.
MCQ-71A Cortex-M4 RTOS runs a sensor task unprivileged and its GPIO driver privileged, with an enabled 1024-byte MPU region at `0x40021000` covering the GPIO registers and the background region disabled. A wild pointer in the sensor task writes to `0x40021018`, while the driver must still write those registers. Which MPU access permission catches the wild write without breaking the driver?
Answer to see the discussion.
MCQ-72A Cortex-M7 firmware runs from internal flash with its instruction cache enabled and flash is locked in production. A debugger must halt at one instruction in read-only flash without rewriting flash or stalling for an erase cycle. Which breakpoint type should it use?
Answer to see the discussion.
MCQ-73A Cortex-M4 firmware is halted in its HardFault handler by OpenOCD over SWD, with RAM intact and the matching ELF on the host. The engineer needs the stacked registers and backtrace without restarting firmware or overwriting RAM. What should GDB do first?
Answer to see the discussion.
MCQ-74A Cortex-M4 firmware reads a `uint32_t` object through a `float*` cast, correct at `-O0` but wrong at `-O2`. What diagnosis follows from the aliasing rule?
Answer to see the discussion.
MCQ-75A Cortex-M4 C++17 driver at `-O2` reads a sensor's 4-byte sample from `uint8_t raw[4]` with `float f = *(float*)raw;`, and the value intermittently goes stale after optimisation. Which change removes the undefined behaviour while preserving the exact bytes?
Answer to see the discussion.
MCQ-76A little-endian Cortex-M0 receives a frame into a buffer at an odd address. On the wire, after a one-byte type, a big-endian uint32_t timestamp and a big-endian uint16_t length follow with no padding. Which extraction of the timestamp is correct without a fault?
Answer to see the discussion.
MCQ-77A little-endian Cortex-M4 receives a big-endian frame where a `uint32_t` field arrives as bytes `0x12 0x34 0x56 0x78` in that order. Firmware must store the numeric value `0x12345678` for later use. Which parsing expression produces that value?
Answer to see the discussion.
MCQ-78A Cortex-M4 firmware must reinterpret a `uint32_t` sensor word as a `float` under strict aliasing, where a pointer cast miscompiles at `-O2`. Which C construct is the defined way to do this reinterpretation?
Answer to see the discussion.
MCQ-79A Cortex-M4 node stores 180 sensor calibrations in an open-addressing table with 8-byte entries and a 2048-byte RAM budget for the table. Lookups run in a 10 us ISR and must use power-of-two masking without division. What table size should firmware allocate?
Answer to see the discussion.
MCQ-80A Cortex-M4 UART ISR stores received bytes in `rx_buf[100]` and advances `head` after each store, while a task consumes from `tail`. The ISR currently wraps `head` with a bit mask, and after the first 64 bytes the consumer starts seeing overwritten data. What head advance should the ISR use for this buffer?
Answer to see the discussion.
MCQ-81A Cortex-M4 RTOS keeps up to 32 pending tasks, inserts a new task at the head on every 1 ms tick, and scans the whole list each cycle in newest-first order to check deadlines. No task is accessed by index and the node must run for years without rebooting. Which structure fits this task list?
Answer to see the discussion.
MCQ-82A Cortex-M4 firmware parses nested protocol frames up to eight levels deep, but recursion is banned because the task stack cannot guarantee worst-case depth. Which parsing structure tracks open frames without recursive calls?
Answer to see the discussion.
MCQ-83A 10 Hz level sensor on a Cortex-M4 feeds a sliding window after firmware discards samples at the 4095 saturation rail. During slow fills quantisation can hold the same code for up to 2 s, and firmware must flag a stuck mid-scale sensor within 5 s. What stuck condition should firmware use?
Answer to see the discussion.
MCQ-84A Cortex-M4 stores 2048 sensor frames sorted by timestamp in flash, with exactly one frame duplicated consecutively and only a few bytes of spare RAM. Which scan finds the duplicated frame in one pass?
Answer to see the discussion.
MCQ-85A Cortex-M4 ISR maps a 12-bit ADC code through a sorted 1024-entry calibration table in flash, with a 10 us budget and no RAM for an auxiliary index. Codes cluster near the ends so spacing is uneven, and many codes have no entry. Which lookup method fits this ISR?
Answer to see the discussion.
MCQ-86A Cortex-M4 firmware stores each sensor's next calibration deadline in a min-heap and repeatedly runs the task with the soonest deadline. Which heap entry should it run next?
Answer to see the discussion.
MCQ-87A Cortex-M4 node uses a `uint32_t` millisecond tick that wraps after about 49 days. A task records `start` then waits for a 5000 ms timeout with `tick >= start + 5000`, but the wait hangs when the wrap falls between start and the deadline. What check makes the timeout expire correctly across the wrap?
Answer to see the discussion.
MCQ-88A Cortex-M4 firmware uses a free-running `uint32_t` millisecond tick that wraps after about 49 days. A task must run every 100 ms and check whether its deadline has passed, including across the wrap. Which comparison implements that check correctly?
Answer to see the discussion.
MCQ-89A Cortex-M4 bootloader verifies a 256 KB application image in external SPI flash before jumping, where a marginal flash driver causes single-bit flips, swapped byte pairs, and burst errors up to 32 bits. Boot time allows several milliseconds for the check. Which integrity check should it use?
Answer to see the discussion.
MCQ-90A Cortex-M4 gateway authenticates to the cloud with a device private key, and field units can be captured and their flash dumped. A secure element on I2C can sign digests internally without exporting its key. Firmware currently stores the key in application flash and passes it to a signing function. What change protects the key?
Answer to see the discussion.
MCQ-91A sealed Cortex-M4 field unit intermittently HardFaults and resets, and returned units are power-cycled before bench inspection. Production must block SWD cloning, yet engineers need the fault cause from returned units. What shipping configuration meets both requirements?
Answer to see the discussion.
MCQ-92A field gateway receives a 256 KB firmware update over a public network and its bootloader decrypts it with a device-unique AES key before flashing. An attacker who compromises the update server can upload arbitrary encrypted blobs, and the vendor signing key never leaves the build server. Which bootloader choice provides authenticity for the update?
Answer to see the discussion.
MCQ-93A device has anti-rollback fuses set to minimum firmware version 5 and currently runs version 5. An attacker presents a validly signed version 3 image with a correct CRC. What should the bootloader do with that image?
Answer to see the discussion.
MCQ-94A Cortex-M4 device sends a 32-bit nonce in each authentication handshake and the server accepts it only if it matches the device's next value, with the LCG parameters public and an attacker able to capture many nonces. The MCU has a hardware TRNG that returns a fresh 32-bit word per handshake, while the current firmware seeds an LCG once from the boot tick. Which nonce generation change should firmware make?
Answer to see the discussion.
MCQ-95A Cortex-M4 gateway stores its anti-replay counter in NOR flash and increments it on every boot, with power loss possible during any write or erase. The flash has 4 KB erase blocks and the counter must never decrease after a reset, even if the last update was interrupted. Which storage scheme guarantees that property?
Answer to see the discussion.
MCQ-96A factory provisions 10,000 Cortex-M4 units monthly, each needing a unique cloud-authentication key. The factory HSM holds a master secret, each MCU exposes a unique OTP UID, and provisioning uses an authenticated wired channel. The factory PC must not retain keys, and extracting one unit's flash must not reveal another unit's key. Which provisioning flow meets these constraints?
Answer to see the discussion.
MCQ-97A Cortex-M device runs its application in the non-secure world and must keep a device key from being read by that application code. Where should key handling and the raw key be placed to isolate them?
Answer to see the discussion.
MCQ-98A Cortex-M4 ships as revisions A, B and C sharing one bootloader key slot, with strap voltages 0.9 V, 1.65 V and 2.4 V, each ±0.1 V, and a floating strap reading near 0 V. Image headers carry target revision and version, and headers are editable before flashing. What bootloader check accepts only images signed for this board?
Answer to see the discussion.