Apple Firmware Engineer Interview Questions

Interview questions and coding challenges based on skills from public Apple job postings.

Not affiliated with or endorsed by Apple. Apple is a trademark of its owner, used here only to say which postings this page describes.
To ask for a change or removal: support@ohmwork.io

Start practicing

From public job postings

SkillPostings
Hardware bring-up and debugging9 of 10
C on microcontrollers10 of 10
Memory and flash footprint3 of 10
I2C, SPI and UART6 of 10
Power and low power design6 of 10
Interrupts and real time deadlines6 of 10
Sensors, actuators and control loops4 of 10
RTOS and bare metal firmware4 of 10
USB Not practiced here6 of 10
Bluetooth and Bluetooth Low Energy Not practiced here7 of 10
Automated firmware testing Not practiced here3 of 10
Sources (11)
  1. Firmware Engineer Cupertino, CA, checked November 28, 2026
  2. Haptics Firmware Engineer Cupertino, CA, checked November 28, 2026
  3. Display Firmware Engineer San Francisco Bay Area, CA, checked November 28, 2026
  4. Senior Firmware Engineer Cupertino or San Jose, CA, checked November 28, 2026
  5. Bluetooth Embedded Software Engineer, Wireless Technologies and Ecosystems Cupertino, CA, checked November 28, 2026
  6. Bluetooth Firmware Engineer, Wireless Technologies and Ecosystems San Diego, CA, checked November 28, 2026
  7. Bluetooth/Thread Embedded Software Engineer, Wireless Technologies and Ecosystems Cupertino, CA, checked November 28, 2026
  8. Embedded Software Engineer, Always On Platforms, Core OS Cupertino, CA, checked November 28, 2026
  9. Software Engineer, Embedded Software Cupertino, CA, checked November 28, 2026
  10. Accessory Design Guidelines for Apple Devices developer.apple.com, checked November 28, 2026
  11. AirPods Firmware Engineer Cupertino, CA, closed November 28, 2026

Bring-up and debugging

9 of 10 jobs

On a new board, what do you get working first, and why?

Something you can see without trusting much else. A pin you toggle and watch on a scope or an LED proves the core runs your code, and its rate shows whether the clock is roughly right. Next a console, a UART or the SWO trace pin, so every later step can report. Then one peripheral at a time, each checked on the wire against its datasheet before the next. If nothing runs at all, check power, reset, the boot pins and whether a debugger can attach over SWD before suspecting the code.

Practice it: Heartbeat

A sensor that works on the dev kit is silent on your board. Where do you look?

Start at the schematic, not the code: the sensor's supply and any enable or reset pin, the pull ups on an I2C bus, the address strap, and which MCU pins the board actually routes to it, with their alternate function settings. Then put a logic analyzer on the bus. No clock at all points at the MCU side: the peripheral clock enable, the pin mode or the alternate function number. A clock with the address not acknowledged points at the device: its power, its reset state or the address. A capture from the working dev kit is the best reference.

Practice it: Dead Air

How do you debug a timing bug that disappears when you halt in the debugger?

A halt stops the core but not the outside world: other chips, the bus and, unless the debug settings freeze them, the timers keep going, so a breakpoint changes the timing you want to see. Use methods that barely disturb it: toggle a spare pin at the points of interest and read the timing on a scope or logic analyzer, record events into a RAM buffer and print it afterwards, or send short messages through the ITM trace port. Each still costs a few cycles, so keep them short and compare builds that carry the same instrumentation.

Practice it: Back Channel

Embedded C and memory budgets

10 of 10 jobs

How do you find what is using your flash and RAM?

Read the linker's map file, or run arm-none-eabi-size and nm --size-sort on the ELF. Flash holds code (.text), constants (.rodata) and the initial values of initialized globals; RAM holds those globals (.data), zeroed globals (.bss), the stack and any heap. The usual large items are library code that one call pulls in, such as printf with floating point formatting, tables that are not const, and buffers sized for a case that never happens. The build options matter too: -Os, link time optimization, and -ffunction-sections with --gc-sections shrink or drop code.

Where should a large lookup table live, and how do you make sure it does?

In flash, by declaring it static const. On a Cortex-M the flash is part of the address space, so code reads the table where it is stored and it costs no RAM. Without const it goes in .data: it takes flash for its initial values, the same amount of RAM, and a copy at startup before main(). Check the map file for the section it landed in. A table of pointers needs the pointers const as well, const char *const names[], or the array itself is writable and lands in RAM.

After a change to the startup code, every initialized global reads as zero. Why?

Before main(), the startup code copies the initial values of .data from flash to RAM and clears .bss, using bounds the linker script defines, such as _sidata, _sdata and _edata. Those symbols are addresses, not variables: the code must use &_sdata, never the value stored there. Read the value instead and the copy starts from, or stops at, the wrong address, so the globals get whatever is there, often zero. The map file shows where each symbol points.

Practice it: Cold Start

I2C, SPI and UART

6 of 10 jobs

How do you choose between I2C, SPI and UART for a part?

Often the part decides: many sensors offer one bus, or both I2C and SPI. I2C runs two open drain wires shared by many devices, each with an address and an acknowledge on every byte, at 100 kHz to 1 MHz on common parts; it saves pins, but it is slow and one stuck device can hold the whole bus. SPI uses a clock, two data lines and a chip select per device, runs push pull at several MHz or more, and has no acknowledge, so a missing device reads back as 0xFF or 0x00 instead of failing. A UART has no clock and joins two devices that agree on a baud rate; it suits consoles and modules such as a radio or GPS receiver.

How do you find out which devices answer on an I2C bus?

Scan it: for each 7 bit address send a start, the address with the write bit and a stop, and note which addresses are acknowledged. Skip the reserved ranges 0x00 to 0x07 and 0x78 to 0x7F. During bring-up one scan checks the wiring, the pull ups, each device's power and its address strap at once. A few parts misbehave on an empty write, so the common EEPROM addresses are safer probed with a one byte read.

Practice it: Census

Two devices on one board each work alone, but one fails when both drivers run. Why?

They share pins, buses and peripheral registers, so whatever one driver leaves behind the other inherits. The classic cause is a whole register write in one driver's setup that overwrites fields another driver had set, such as another pin's mode or the bus's clock settings; the part that breaks is the one set up first. On a shared SPI bus, also check that each driver sets its own clock polarity, phase and speed, and that no chip select is left low, so two devices drive MISO at once. Change only your own fields with read modify write, and set the bus mode a device needs before each transfer.

Practice it: Cascade

A sender stops halfway through a UART command. How does the receiver recover?

Bound each message in time as well as by its framing. Restart a timer on every received byte; when the gap passes a limit, a few character times or whatever the protocol defines, drop the partial message and return the parser to idle. Without that, the leftover bytes join the next message and it is answered wrong. Framing still matters: a length field or a delimiter tells the parser where a message ends, and a checksum tells it whether to trust it.

Practice it: Dial Tone

Low power

6 of 10 jobs

How do you pick a sleep mode for a battery powered device?

Weigh what keeps running, what survives and how long waking takes. On an STM32F4, Sleep stops only the core's clock: peripherals keep working and any enabled interrupt wakes it almost at once. Stop halts most clocks but keeps RAM and registers; an EXTI line wakes it, and the clocks must be set up again afterwards. Standby loses RAM and registers, keeping only the backup domain; only the WKUP pin, an RTC event, a reset or the independent watchdog wakes it, and it restarts as from reset. Pick the deepest mode whose wake sources and wake time still meet the device's deadlines, and make sure the wake source is really enabled, or the device sleeps for good.

Practice it: Hibernation

Besides sleeping, how does firmware cut power?

Switch off what is idle: gate the clocks of unused peripherals, put sensors in their own shutdown mode between samples, and set unused pins to analog mode so no input floats and draws current. When the work allows, run fast and then sleep rather than run slowly and stay awake; let DMA move data while the core sleeps; lower the system clock when the remaining work does not need it. Most of these are register writes, so each one is easy to confirm on the bench with a current meter.

How do you measure how much current the firmware draws?

Over a whole cycle of the device's work, not at one moment: with a power analyzer, a source measure unit, or a small shunt resistor and a scope. The average is each phase's current times its duration, summed and divided by the cycle length, so a short burst that repeats often can outweigh a long sleep. Toggle a spare pin at the start and end of each phase to line the current trace up with the code. Take final numbers with the debugger disconnected: an attached debugger can keep clocks running in low power modes.

Interrupts and timing

6 of 10 jobs

How do you measure interrupt latency on real hardware?

Drive a spare pin high as the first thing in the handler and put a scope on both the input and that pin: the gap is the latency your code actually sees. On a Cortex-M4 the hardware's share is 12 cycles from zero wait state memory, but the total adds flash wait states, a handler of equal or higher priority already running, any code that masks interrupts, and the handler's own entry code. Measure many events and keep the worst, not the average.

Two interrupts are pending at once. Which runs first, and can one interrupt the other?

On a Cortex-M the NVIC runs the more urgent one first, and a smaller priority number is more urgent. A new interrupt preempts a running handler only if its preemption priority is strictly higher; at equal priority it waits. Among waiting interrupts of equal preemption priority, the subpriority and then the lower exception number decide. STM32F4 parts implement 4 priority bits, the top of each priority byte, so NVIC_SetPriority takes 0 to 15. Give the interrupt with the tightest deadline the most urgent level.

Practice it: Chokepoint

How do you make sure periodic work meets its deadline when other code shares the CPU?

Start it from a hardware timer, not a software loop, so its start time does not depend on what else ran. Give that interrupt a priority above work that can wait, keep its handler bounded, and move anything slow into lower priority code. Then measure: toggle a pin around the work and record the worst execution time and the worst start delay over a long run, against the period. Leave margin for the cases testing did not reach.

Practice it: The Fly

Sensors and control loops

4 of 10 jobs

Why close a control loop instead of setting the output from a table?

A setting worked out in advance is right for one load, supply voltage and temperature only. Feedback measures the result and corrects by the error on every cycle: a proportional term reacts to the present error, and an integral term removes the error that remains in steady state. The loop should run on a fixed period from a hardware timer, or scale its terms by the measured step, because the integral and any derivative assume a constant time step, and jitter in that step looks like noise to the controller.

Practice it: Cruise

A sensor reading is noisy or has spikes. How do you filter it?

Choose the filter for the disturbance. A moving average, or a first order low pass, smooths random noise; in integer math keep the state scaled, acc += x - acc / 8 with y = acc / 8, so truncation cannot stall it short of the input. A median of the last three or five samples removes single spikes that an average would smear. Readings outside the sensor's range, or changing faster than the physics allows, are better rejected than averaged in, and the range test must use the sensor's own data type: an unsigned byte held in an int8_t turns every reading of 128 or more negative. Every filter adds delay, which a control loop pays for in stability.

Practice it: Fallback

How does firmware drive a motor or a haptic actuator?

Through a driver stage, never straight from a pin: a timer generates PWM, its period register setting the frequency and its compare register the duty, and an H bridge or gate driver switches the current. For a DC motor the duty sets the average voltage, and a carrier above about 20 kHz keeps the switching out of hearing. A linear resonant actuator is driven differently, with an alternating waveform near its resonant frequency, so the firmware updates its drive over time rather than holding one duty.

Practice it: Quiet Mode

RTOS or bare metal

4 of 10 jobs

When do you choose bare metal over an RTOS?

Bare metal, a main loop plus interrupts, suits a device with a few activities whose timing you can reason about directly: it uses the least memory and has no scheduler to analyze. An RTOS pays off when several independent activities run at different rates and each needs to wait, such as a radio stack, sensors and a user interface; tasks with priorities replace a hand written scheduler. The cost is a stack per task, the scheduler's time, and new kinds of bug, such as priority inversion and races between tasks.

Two tasks need the same SPI or I2C peripheral. How do you share it?

Lock one whole transaction, not one byte: hold a mutex from chip select to chip select, or for a complete register read, so no other task starts a transfer in the middle. A FreeRTOS mutex also raises its holder's priority while a more urgent task waits, which limits priority inversion. The other common design is one task that owns the peripheral and takes requests through a queue. Either way, never take a mutex in an interrupt handler.

Practice it: Handshake

Also recommended

State machines and fault handling

How do you structure firmware for a device with modes such as sleep, charging and active?

As an explicit state machine: one variable holds the state, and one function takes each event (a button, a timer, a fault) and decides the next state and its action. Decide what every event means in every state, even when the answer is to ignore it, so an event at an odd moment cannot fall through. Keep entry and exit actions in one place, and let fault events win over normal ones, so a fault is handled whatever the device is doing.

Practice it: Automaton

What should firmware do when a sensor stops answering?

Never wait on it forever: put a timeout on every bus transaction, retry a few times, then report the reading as missing rather than passing on a stale or default value as if it were real. Try to recover the part, by its reset pin or by cycling its power, and keep the rest of the device working. As the last line, feed a watchdog only when the system makes real progress, so a hang nobody foresaw still ends in a reset.

Practice it: Dead Man's Switch

Go deeper

Related

Loading the interactive arena.