Microcontrollers and Interfacing

Chapter 11
Hardware–Firmware Co-Design and System Integration

Bachelor Program in Mechatronics Engineering
Microcontrollers and Interfacing   •   Bachelor

Hardware–Firmware Co-Design and System Integration

Introduction

A microcontroller system is not merely a circuit containing a processor and a program. It is an integrated cyber-physical product in which hardware decisions determine what firmware can observe and control, while firmware requirements determine clocking, memory, timing, power, protection, and interface circuits. This mutual dependence is the basis of hardware–firmware co-design.

In a conventional sequential process, hardware is designed first and software is written afterward. That approach is suitable for simple systems, but it becomes inefficient when a product must meet strict limits on response time, energy consumption, physical size, cost, safety, or updateability. Co-design instead treats the hardware and firmware as parts of one engineered system. Interfaces, timing assumptions, reset behavior, memory allocation, diagnostics, and update mechanisms are specified together and verified at system level.

This chapter examines the integration of clocks, reset circuits, power supplies, memory, peripherals, PCB interfaces, bootloaders, firmware updates, and low-power operation. It also develops a framework for making trade-offs among performance, memory, energy, cost, reliability, cybersecurity, and maintainability.

Learning Objectives

After studying this chapter, a student should be able to:

  1. Explain why hardware and firmware requirements must be developed together.
  2. Select and integrate clock, reset, power, memory, peripheral, and PCB-interface subsystems.
  3. Analyze timing, power, memory, and reliability constraints.
  4. Describe bootloaders, secure firmware updates, rollback, and fault recovery.
  5. Design low-power operating strategies using sleep modes and power domains.
  6. Evaluate engineering trade-offs involving performance, cost, energy, maintainability, and safety.
  7. Apply a structured integration and verification process to an embedded product.

1. The Co-Design View of an Embedded System

A useful embedded-system model contains six interacting layers:

  • Physical environment: motors, sensors, switches, loads, temperature, vibration, and electromagnetic noise.
  • Electrical hardware: power conversion, signal conditioning, protection, clock, reset, processor, memory, and interfaces.
  • Firmware: startup code, drivers, interrupt service routines, operating logic, diagnostics, and communication protocols.
  • Application behavior: control algorithms, user functions, data logging, and fault responses.
  • Development and production infrastructure: programming tools, test fixtures, calibration data, manufacturing tests, and update services.
  • Governance and lifecycle: safety, cybersecurity, configuration control, maintenance, and regulatory compliance.

A requirement such as “the controller shall regulate speed within 1%” has consequences at every layer. The sensor resolution and sampling rate are hardware concerns; timer configuration and control-loop scheduling are firmware concerns; PWM frequency affects switching losses and acoustic noise; and verification requires both electrical measurements and software tests.

A co-design process normally proceeds through the following loop:

  1. Define system functions and measurable requirements.
  2. Partition functions between hardware and firmware.
  3. Establish interfaces and timing contracts.
  4. Build prototypes and models.
  5. Verify behavior at unit, board, subsystem, and system levels.
  6. Measure actual performance, energy, memory, temperature, and fault behavior.
  7. Refine the design and control configuration changes.

The central principle is that an interface is a contract, not merely a connector. A contract should specify voltage levels, direction, timing, initialization state, error behavior, data format, ownership, and test method.

2. Clock Architecture and Timing Integrity

The clock system establishes the time base for the CPU, timers, communication peripherals, watchdog, and sometimes analog subsystems. Typical sources include an internal RC oscillator, an external crystal or resonator, an external clock input, and a phase-locked loop (PLL).

An internal oscillator is inexpensive and fast to start, but its frequency varies with voltage, temperature, and manufacturing process. A crystal generally provides better frequency stability but adds components, board area, startup time, and sensitivity to layout. A PLL can multiply a reference frequency, but introduces lock time, configuration complexity, and possible jitter.

If a reference clock of frequency fref is multiplied by a PLL factor N and divided by a prescaler M, the ideal output is:

fout = (N/M) fref

Here, fout and fref are frequencies in hertz, while N and M are dimensionless ratios. The equation applies when the PLL is locked and its configuration supports the selected factors. Actual frequency also includes reference tolerance, PLL error, and temperature effects.

For a periodic timer with clock frequency fclk, prescaler P, and auto-reload value ARR, the update frequency is commonly:

fupdate = fclk / [P(ARR + 1)]

The “+1” occurs because a counter configured from zero through ARR has ARR + 1 states. This formula assumes edge-aligned counting and no additional clock division. Center-aligned PWM and advanced timer modes require the corresponding device-specific timing equation.

Timing budgets

A real-time task must complete before its deadline. If task execution time is Ci and its period is Ti, a simple utilization estimate is:

U = ∑(Ci/Ti)

U is dimensionless. This sum is a useful first screening measure, not a universal schedulability proof. Interrupt pre-emption, blocking, cache behavior, DMA, operating-system overhead, and deadline relationships must also be considered. A system can fail even when average CPU utilization is low if a high-priority task misses a short deadline.

Clock planning should therefore include:

  • maximum CPU frequency and voltage requirements;
  • peripheral clock domains and permissible ratios;
  • timer resolution and communication baud-rate error;
  • interrupt latency and jitter;
  • oscillator startup and PLL lock time;
  • clock-monitor and fail-safe behavior;
  • electromagnetic emissions and power consumption.

A clock tree should be documented in both schematic and firmware configuration. Hidden assumptions, such as a driver believing that a timer runs at the CPU frequency when it actually uses a divided peripheral clock, are common sources of integration failure.

3. Reset, Startup, and Fault Recovery

Reset places the microcontroller and external devices into known states. Sources include power-on reset, brownout reset, external reset, watchdog reset, software reset, clock failure, and safety-monitor reset.

A robust reset design answers four questions:

  1. At what voltage is operation guaranteed?
  2. Which outputs are safe during ramp-up and reset?
  3. How long must reset remain asserted after power becomes valid?
  4. How can firmware determine the cause of the last reset?

A reset supervisor may monitor supply voltage and assert reset when the voltage falls below a threshold. The threshold must include tolerance, hysteresis, transient behavior, and the minimum operating voltage of the processor and peripherals. A reset circuit that releases too early can permit corrupted flash reads, invalid GPIO states, or unreliable peripheral initialization.

Firmware startup typically performs the following sequence:

  1. The processor fetches an initial stack pointer and reset vector.
  2. Startup code initializes memory sections, including copying initialized data to RAM and clearing zero-initialized data.
  3. Clock and power configuration are established.
  4. Safety-critical pins are placed in safe states.
  5. Drivers and communication peripherals are initialized.
  6. Self-tests and configuration validation are performed.
  7. The application scheduler or main loop begins.

The startup sequence should be deterministic and should not depend on unvalidated external data. A boot status record can preserve reset cause, watchdog history, firmware version, and fault counters in a protected nonvolatile region. Care is required because repeated resets can wear nonvolatile memory; event records may require wear leveling or bounded-rate logging.

4. Power Architecture and Energy Management

Power integrity is a system property shared by the regulator, PCB, load, firmware, and enclosure. A supply architecture may include a battery, fuse or protection switch, buck or boost converter, linear regulator, load switches, filtering, and voltage monitors.

For a regulator supplying load power Pload from input power Pin, efficiency is:

η = Pload/Pin

where η is dimensionless and normally expressed as a percentage. For a linear regulator, neglecting quiescent current, the approximate power dissipated is:

Pdiss ≈ (Vin − Vout) Iload

Here, voltages are in volts and current is in amperes, producing power in watts. The approximation excludes regulator ground current and transient effects. Excess dissipation raises junction temperature and may require thermal design.

For a battery-operated system, an approximate operating time is:

toperating ≈ Ebattery/Eload

where both energies use the same unit, such as watt-hours. This estimate assumes constant effective battery energy and load. Temperature, discharge rate, converter efficiency, aging, and cutoff voltage make actual operating time lower or otherwise different.

Power design should address:

  • maximum, typical, and sleep currents;
  • inrush current and bulk capacitance;
  • regulator transient response;
  • voltage sequencing between devices;
  • analog and digital supply isolation;
  • reverse-polarity, overcurrent, and surge protection;
  • thermal limits and derating;
  • electromagnetic compatibility.

Firmware contributes through clock scaling, peripheral shutdown, duty cycling, sensor excitation control, and power-domain sequencing. A peripheral should not be disabled merely by stopping its clock if its external pins can back-power another device. GPIO states, pull-ups, level translators, and isolation paths must be analyzed in every power state.

5. Memory Architecture and Allocation

Microcontrollers commonly contain flash or other nonvolatile program memory, SRAM for variables and stacks, and sometimes EEPROM, backup RAM, external RAM, or external flash. Memory integration involves capacity, speed, endurance, retention, bus width, security, and update strategy.

A practical memory map reserves explicit regions for:

RegionTypical contentsDesign concern
Boot regionimmutable or protected bootloaderrecovery and trust anchor
Application regionexecutable firmwareimage size and replacement
Configuration regiondevice settings and calibrationvalidation and wear
Data-log regionevents and measurementsendurance and integrity
RAM regionstack, heap, buffers, stateoverflow and fragmentation
Backup regionreset cause or retained statepower-loss behavior

Static allocation is often preferred in safety- or resource-constrained systems because memory use is known at build time. Dynamic allocation can be useful, but fragmentation, failed allocation, and nondeterministic timing must be controlled.

A basic RAM budget is:

RAMrequired = RAMstatic + RAMstack + RAMbuffers + RAMdynamic + RAMmargin

The terms are measured in bytes. The margin should be justified using worst-case analysis or stress testing rather than selected arbitrarily. Stack-watermark measurements can reveal the maximum observed stack depth, but observation is not a proof of the absolute worst case.

Firmware and hardware must agree on endianness, alignment, structure packing, nonvolatile formats, and versioning. A binary structure written by one firmware version may become invalid after a field is added or its type changes. Robust formats include a magic value, version, length, sequence number, payload, and integrity check.

For an error-detecting cyclic redundancy check (CRC), the exact result depends on the generator polynomial, initial value, input reflection, output reflection, and final XOR. Therefore, a design must specify the complete CRC profile, not merely “CRC-32.” CRC detects many accidental errors but is not a cryptographic authenticity mechanism.

6. Peripheral and PCB Interface Integration

Peripheral selection begins with system requirements rather than available pins. Important questions include data rate, latency, direction, electrical level, cable length, noise environment, fault tolerance, and whether communication must continue during low-power operation.

Digital interfaces

  • GPIO: simple and flexible, but susceptible to accidental contention and undefined startup states.
  • UART: asynchronous point-to-point communication; requires compatible baud rate, framing, and voltage levels.
  • SPI: high throughput and low protocol overhead; requires chip-select management and careful clock polarity and phase configuration.
  • I²C: two-wire multidrop bus using pull-up resistors; rise time depends on bus capacitance and pull-up resistance.
  • CAN or similar differential buses: robust for distributed control, with termination and transceiver-fault considerations.
  • USB and Ethernet: higher protocol complexity but strong ecosystem support and greater data capability.

For an open-drain bus, the approximate RC rise-time behavior is controlled by pull-up resistance RP and bus capacitance CB. A smaller resistance improves rise time but increases low-level current; a larger resistance reduces current but may violate timing. The actual standard defines the permitted rise time and logic thresholds, so component selection must be checked against those limits rather than based only on nominal voltage.

Analog interfaces

ADC performance depends on reference accuracy, source impedance, acquisition time, noise, grounding, layout, and calibration. If an ideal ADC has resolution N bits and reference voltage Vref, its nominal least-significant-bit size is:

VLSB = Vref/2N

This is an ideal quantization interval. It does not imply that the effective accuracy is N bits, because offset, gain error, noise, nonlinearity, and reference error may dominate.

PCB-level concerns

Hardware–firmware integration requires explicit treatment of:

  • pin multiplexing and alternate functions;
  • pull-up and pull-down resistors;
  • boot-strapping pins and their reset-state requirements;
  • decoupling placement and return-current paths;
  • differential-pair routing and controlled impedance where needed;
  • analog/digital ground strategy;
  • connector protection and ESD paths;
  • test points for power, reset, clocks, and communication;
  • component tolerances and assembly variants.

A schematic can be logically correct while the PCB fails because of poor return paths, inadequate decoupling, excessive trace capacitance, or an unprotected external connector. Firmware diagnostics should therefore expose electrical symptoms, such as supply undervoltage, bus-off status, ADC reference faults, and communication timeouts.

7. Bootloaders and Firmware Updates

A bootloader is a program that executes before the main application and may select, authenticate, copy, or recover firmware. A minimal bootloader can load code through a serial port; a production bootloader commonly also validates image integrity, handles version compatibility, and supports recovery from interrupted updates.

A safe update sequence is:

  1. Receive an image into an inactive region or external storage.
  2. Check length, format, target identity, version policy, and integrity.
  3. Authenticate the image if the product requires protection against unauthorized code.
  4. Mark the image as pending.
  5. Reboot and perform a controlled activation.
  6. Require the new application to confirm successful startup.
  7. Commit the image or roll back to the previous known-good image.

Integrity answers “was the image corrupted?” Authentication answers “did an authorized entity create it?” A checksum or CRC is appropriate for accidental transmission errors; a digital signature or message-authentication mechanism is required when adversaries must be excluded. Private signing keys must not be stored in ordinary production firmware or widely accessible build systems.

An update design should consider power loss during erase and programming, flash erase granularity, recovery through a wired service interface, anti-rollback policy, device identity, audit records, and the possibility that a security fix must replace an older image. Secure boot establishes a chain of trust from an immutable or protected root to the application.

8. Low-Power Modes and Wake-Up Design

Low-power design is not simply selecting sleep mode. It is a coordinated state machine. A product may define states such as active, idle, sensing, communication, deep sleep, and fault recovery. Each state specifies clock sources, enabled peripherals, GPIO states, RAM retention, wake sources, and allowed transitions.

Average current for repeated operating phases can be estimated by:

Iavg = [∑(Ii ti)]/[∑ti]

Here, Ii is the current during phase i, ti is its duration, and the denominator is the total cycle time. This equation assumes piecewise-constant current within each phase. Startup surges and battery-converter behavior should be included when they materially affect energy use.

Energy-saving methods include reducing clock frequency when workload permits, disabling unused clocks, batching sensor measurements, reducing radio duty cycle, using DMA instead of continuous CPU polling, and selecting a wake-up source that remains powered in deep sleep. The energy cost of entering and leaving sleep must be included; very short sleep intervals may consume more energy than remaining active.

Wake-up behavior must be deterministic. Firmware should restore clocks before using peripherals that depend on them, reinitialize communication links when necessary, and validate retained state. A wake event caused by noise or an unhandled interrupt can produce excessive current consumption and apparent system instability.

9. Performance, Cost, Energy, and Maintainability Trade-offs

Optimization is multi-objective. Increasing CPU frequency may reduce execution time but increase dynamic power and electromagnetic emissions. Adding external memory may simplify data logging but increase cost, board area, and attack surface. A hardware accelerator may improve throughput while making verification and future portability harder.

A useful qualitative decision matrix is:

DecisionPerformanceEnergyCostMaintainability
Higher clock frequencyincreasesusually worsensmay increaseneutral or worsens
DMA transferincreases CPU availabilityoften improveslow hardware costrequires careful driver design
External memoryincreases capacitymay worsenincreasescan simplify upgrades
Dedicated hardware logicincreases determinismmay improveincreases development costmay reduce flexibility
Dynamic allocationflexiblevariablelow hardware costcan reduce predictability

The correct choice depends on requirements and lifecycle cost, not on a single benchmark. Maintainability is improved by modular drivers, documented interfaces, automated tests, meaningful diagnostics, reproducible builds, version control, coding standards, and separation between board-specific code and application logic.

Traceability links each requirement to design elements and verification evidence. For example, “motor output shall enter a safe state within 10 ms of watchdog failure” should map to reset circuitry, output-enable hardware, watchdog configuration, firmware behavior, and a measured test result.

10. Integration Verification and Validation

Verification asks whether the system was built according to its specification; validation asks whether it solves the intended problem. Both require more than compiling firmware.

A staged integration strategy is effective:

  1. Verify power rails without the processor installed or enabled.
  2. Confirm reset thresholds, clock startup, and current consumption.
  3. Program a minimal hardware-diagnostic image.
  4. Test each peripheral with known electrical stimuli.
  5. Exercise communication under nominal and fault conditions.
  6. Integrate drivers and application tasks incrementally.
  7. Perform stress, thermal, timing, brownout, EMC, and recovery tests.
  8. Repeat tests across component tolerances and production variants.

Useful instruments include oscilloscopes, logic analyzers, current probes, protocol analyzers, debuggers, programmable supplies, environmental chambers, and automated test fixtures. Measurements should record configuration, firmware version, equipment calibration status, and pass/fail criteria.

Fault injection is particularly valuable. Examples include disconnecting sensors, shorting communication lines through safe test equipment, corrupting configuration data, interrupting an update, lowering supply voltage, and forcing watchdog expiration. The desired response should be defined before testing.

Illustrative Case Study: Battery-Powered Motorized Valve Controller

Background

Consider an illustrative controller for a battery-powered irrigation valve. It measures soil moisture, drives a low-voltage actuator, communicates through a differential bus during maintenance, and must operate for one year between battery changes.

Problem

The first prototype resets intermittently when the actuator starts. It also consumes excessive current in sleep, and a field update can leave the unit unusable if power fails during programming.

Analysis

Oscilloscope measurements show a short supply droop during actuator startup. The reset threshold is close to the minimum processor operating voltage, so the processor sometimes enters an undefined region. Firmware also leaves an analog sensor bias circuit enabled during sleep. Finally, the bootloader erases the only application region before receiving the complete replacement image.

Approach and solution

The redesign uses a load switch and separate bulk capacitance for the actuator path, while the regulator and PCB return paths are reviewed for transient current. A reset supervisor with suitable hysteresis holds the processor in reset during undervoltage. The firmware configures the actuator output to a safe state before enabling the load.

The sensor bias is controlled by a GPIO or dedicated load switch and is disabled during long sleep intervals. The low-power state machine retains only the RTC and wake-up circuitry. Current is measured in each state rather than inferred from data-sheet typical values.

The bootloader adopts an A/B image arrangement. A new image is received into the inactive region, verified, and marked pending. If power fails, the bootloader retains the previous image. The new application must send a confirmation after initialization and self-test; otherwise the bootloader rolls back.

Outcome

The revised design separates actuator transients from processor power, provides deterministic reset behavior, reduces sleep current, and makes interrupted updates recoverable. More importantly, the improvements result from coordinated changes in schematic, layout, startup firmware, power-state management, and boot policy.

Learning points

  • A reset problem may originate in power distribution rather than software.
  • Low-power measurements must include external loads and leakage paths.
  • Firmware update reliability is a hardware-memory architecture issue as well as a protocol issue.
  • Safe-state requirements should be implemented by both firmware and hardware where consequences justify redundancy.

11. Challenges, Safety, Security, and Contemporary Practice

Modern systems increasingly connect to networks, use machine-learning-assisted functions, and remain in service for many years. Connectivity expands update capability but also enlarges the attack surface. AI-assisted code generation can accelerate driver development, yet generated code must undergo the same review, testing, licensing checks, and safety analysis as human-written code. An AI system should not be treated as an authority for undocumented register behavior or security decisions.

Safety-related products may require formal hazard analysis, independent protection mechanisms, diagnostic coverage, and standards appropriate to their domain. Cybersecurity engineering should include threat modeling, least privilege, secure boot, protected keys, signed updates, vulnerability response, and controlled debug access. Debug ports should be disabled or authenticated in deployed products when appropriate.

Contemporary microcontrollers increasingly provide TrustZone-like isolation, memory protection units, cryptographic accelerators, secure elements, built-in brownout detection, and energy-aware autonomous peripherals. These features are valuable only when integrated into a coherent threat model and verified configuration. Enabling a security feature without controlling keys, debug access, and update policy provides limited protection.

Best practices include:

  • specify electrical, timing, power, and software interfaces together;
  • document clock and reset assumptions;
  • design safe startup and fault states;
  • budget memory and CPU using worst-case reasoning;
  • measure energy in every operating state;
  • protect update paths against corruption and unauthorized code;
  • use versioned data formats and configuration validation;
  • provide production test points and diagnostic telemetry;
  • maintain traceability from requirements to verification evidence;
  • design for service, calibration, replacement, and end-of-life disposal.

Chapter Summary

Hardware–firmware co-design treats the embedded product as one interacting system. Clock selection determines timing, communication accuracy, power use, and real-time capability. Reset and power circuits determine whether startup and fault recovery are deterministic. Memory organization must support application execution, configuration integrity, diagnostics, and safe firmware replacement. Peripheral and PCB interfaces require agreement on electrical levels, timing, protocol, layout, protection, and initialization states.

Bootloaders and update systems must account for power interruption, image integrity, authentication, rollback, and anti-rollback policy. Low-power operation is best designed as a state machine with explicit clocks, peripherals, wake sources, and retained resources. Engineering decisions must balance performance, energy, cost, reliability, security, and maintainability rather than optimize one measure in isolation. Finally, successful integration depends on staged verification, measurement, fault injection, traceability, and disciplined lifecycle management.

Key Terms

Hardware–firmware co-design: Joint development of hardware and firmware as an integrated system.

Clock tree: The arrangement of clock sources, dividers, multiplexers, and multipliers.

PLL: Phase-locked loop used to generate a controlled clock from a reference.

Jitter: Short-term variation in the timing of clock edges.

Reset supervisor: Circuit that monitors supply conditions and controls reset release.

Brownout: Insufficient supply voltage for reliable operation.

Power domain: Circuit region that can be independently powered or disabled.

Bootloader: Startup firmware that loads, validates, selects, or recovers an application.

Secure boot: A chain of verified trust from a protected root to executable firmware.

Rollback: Restoration of a previously valid firmware image after update failure.

DMA: Direct memory access, allowing peripherals to transfer data without continuous CPU intervention.

Memory map: Defined assignment of addresses or regions to code, data, peripherals, and configuration.

CRC: Cyclic redundancy check for detecting many accidental data errors.

Watchdog: Hardware or software timer that initiates recovery when firmware fails to service it.

GPIO: General-purpose input/output pin.

Power-state machine: Defined set of operating states and transitions controlling energy use.

Traceability: Link between requirements, implementation elements, and verification evidence.

Fault injection: Deliberate introduction of abnormal conditions to evaluate recovery behavior.

Review Questions

5 Short Answer Questions

  1. Why is a hardware interface considered a contract between hardware and firmware?
  2. What is the purpose of a reset supervisor?
  3. Distinguish data integrity from firmware authenticity.
  4. Why can a CRC not replace a digital signature for secure updates?
  5. Name two factors that influence ADC accuracy besides nominal resolution.

5 Long Answer Questions

  1. Explain how clock selection affects real-time performance, communication, power consumption, and electromagnetic compatibility.
  2. Describe a robust startup sequence and discuss how reset cause information can support diagnostics.
  3. Compare static and dynamic memory allocation in a resource-constrained microcontroller system.
  4. Explain the design of a low-power state machine, including wake-up sources, GPIO states, and retained resources.
  5. Discuss how verification, validation, traceability, and fault injection contribute to reliable system integration.

3 Analytical / Application Questions

  1. A controller resets when a motor starts. Develop a structured investigation covering power hardware, reset thresholds, PCB layout, GPIO sequencing, and firmware evidence.
  2. Design an A/B firmware-update strategy for a device that may lose power at any point during installation. Specify image validation, activation, confirmation, rollback, and security controls.
  3. For a battery-operated sensor, compare increasing CPU speed, using DMA, batching measurements, and adding external memory. Evaluate the alternatives in terms of timing, energy, cost, and maintainability.

Multiple Choice Questions with Answers

Question 1

Which statement best describes hardware–firmware co-design?

A. Hardware is completed before any firmware requirements are defined.

B. Hardware and firmware are developed as mutually dependent parts of one system.

C. Firmware replaces the need for electrical protection circuits.

D. Only software performance is measured during integration.

Correct Answer: B. Hardware and firmware are developed as mutually dependent parts of one system.

Question 2

A timer has a 48 MHz input clock, prescaler P = 3, and ARR = 999. What is its update frequency?

A. 16 kHz

B. 48 kHz

C. 144 kHz

D. 1.5 kHz

Correct Answer: A. 16 kHz

Question 3

What is the primary purpose of a reset supervisor?

A. To increase flash-memory capacity

B. To generate communication packets

C. To hold the processor reset when supply conditions are unsafe

D. To authenticate firmware images

Correct Answer: C. To hold the processor reset when supply conditions are unsafe

Question 4

Which mechanism provides authenticity of a firmware image?

A. A checksum alone

B. A CRC alone

C. A digital signature verified by a trusted key

D. A longer UART cable

Correct Answer: C. A digital signature verified by a trusted key

Question 5

For an ideal 12-bit ADC with a 3.3 V reference, the nominal LSB size is closest to:

A. 0.806 mV

B. 8.06 mV

C. 80.6 mV

D. 1.21 V

Correct Answer: A. 0.806 mV

Question 6

Why is an inactive image region useful in a firmware-update design?

A. It eliminates the need for a clock.

B. It permits the previous image to remain available if installation fails.

C. It increases ADC resolution.

D. It guarantees immunity from all cyberattacks.

Correct Answer: B. It permits the previous image to remain available if installation fails.

Question 7

Which action generally reduces average energy in a battery-powered sensor?

A. Leaving all sensor bias circuits permanently enabled

B. Polling every peripheral continuously

C. Batching measurements and entering a suitable sleep state

D. Increasing the clock frequency during every operating phase

Correct Answer: C. Batching measurements and entering a suitable sleep state

Question 8

What does DMA primarily provide?

A. Peripheral-to-memory transfers with reduced continuous CPU involvement

B. Automatic replacement of failed firmware signatures

C. A regulated analog supply voltage

D. A mechanical protection enclosure

Correct Answer: A. Peripheral-to-memory transfers with reduced continuous CPU involvement

Question 9

Why must a CRC configuration specify polynomial and initialization details?

A. Different parameter choices can produce different CRC results.

B. The CRC determines the processor clock frequency.

C. CRC parameters determine battery chemistry.

D. Only the polynomial affects PCB impedance.

Correct Answer: A. Different parameter choices can produce different CRC results.

Question 10

Which is an example of traceability?

A. Selecting components only by package color

B. Linking a safety requirement to implementation and test evidence

C. Removing all test points from a production PCB

D. Changing firmware without recording its version

Correct Answer: B. Linking a safety requirement to implementation and test evidence

Microcontrollers and Interfacing
Chapter 11 of 14