Firmware Review Activities

Firmware Review Activities

animation
prototyping
microcontrollers
WarningCheckpoint: ADC Review Questions

Use these questions to check how voltage, ADC range, and a recorded measurement relate.

  • What is the board’s actual ADC input voltage limit?
  • Does the pin support ADC while Wi-Fi or other peripherals are active?
  • Is calibration needed for the accuracy required by the prototype?
  • Are readings stable after averaging, grounding, and sensor warm-up?
  • Does the evidence record include raw counts, converted values, board voltage, and test conditions?
ImportantCheckpoint: ISR Rules

Check which work belongs in the short interrupt handler and which work belongs in the main loop.

  • Keep the ISR short.
  • Set flags or copy tiny values only.
  • Mark shared ISR variables as volatile.
  • Protect multi-byte shared data when copying it.
  • Do not call delay(), Serial.print(), I2C sensor reads, network functions, dynamic allocation, or long loops in the ISR.
WarningCheckpoint: Review These Before Blaming the Board

Check the setup, wiring, and code path before replacing hardware.

  • Wrong board profile or stale board support package.
  • Wrong serial port or bad USB data cable.
  • Floating button input because no pull-up or pull-down path exists.
  • ADC value interpreted without checking input range, attenuation, or calibration.
  • delay() hiding missed button presses or stale sensor reads.
  • ISR doing serial, sensor, or network work.
  • Code assumes a pin is safe without checking boot strap, ADC, PWM, or peripheral conflicts.
  • Serial logs omit firmware version, pin map, and test conditions.
NoteCheck: Match The Firmware Concept

Match each firmware idea with the behavior it supports.

NoteCheck: Order The Interrupt Handoff

The handler must be brief so the main loop can resume. Put the handoff steps in order.

Memory Recovery Exercise

For each saved field, record how often it is written, how long it must last, and how much data loss is acceptable. Give it a way to detect damage. Size working buffers for the worst expected burst. Then interrupt an update and a log write. Check that the boot code can choose a known-good image and the app can spot a partial record.

Technical boundaries. The interrupt handoff uses a short ISR that sets a volatile flag, with serial, sensor, or network work in the main loop. The ADC review leaves input voltage limit, peripheral conflicts, calibration, and test conditions to be checked.

Back to the chapter