Google Firmware Engineer Interview Questions
Interview questions and coding challenges based on skills from public Google job postings.
Not affiliated with or endorsed by Google. Google 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
From public job postings
| Skill | Postings |
|---|---|
| Low level programming in C or C++ | 5 of 5 |
| Embedded operating systems | 5 of 5 |
| Triage and debugging of issues by their effect on hardware | 5 of 5 |
| Code review for style, testability and efficiency | 5 of 5 |
| Testing software, and software test engineering | 5 of 5 |
| Software design and design reviews Not practiced here | 5 of 5 |
| Data structures and algorithms Not practiced here | 5 of 5 |
| Keeping documentation current Not practiced here | 5 of 5 |
| Technical leadership Not practiced here | 3 of 5 |
| Performance work and systems data analysis Not practiced here | 2 of 5 |
Sources (5)
- Senior Software Engineer, Embedded Systems/Firmware, Platforms Infrastructure Engineering Sunnyvale, CA, checked December 1, 2026
- Senior Software Engineer, Embedded Systems/Firmware, Platforms and Devices Mountain View, CA, checked December 1, 2026
- Senior Software Engineer, Embedded Systems/Firmware, AI and Infrastructure Sunnyvale, CA, checked December 1, 2026
- Software Engineer III, Embedded Systems/Firmware, AI and Infrastructure Sunnyvale, CA, checked December 1, 2026
- Software Engineer III, Embedded Systems/Firmware, Platforms Infrastructure Engineering Sunnyvale, CA, checked December 1, 2026
Low level C
5 of 5 jobs
Port A and port C share one register layout. How do you describe that layout once in C, so the same code can drive a pin on either port?
Write one struct whose members are the port's registers in the order and at the offsets the reference manual gives, each a volatile uint32_t. On the STM32F4 that is MODER at +0x00, OTYPER at +0x04, OSPEEDR at +0x08, PUPDR at +0x0C, IDR at +0x10, ODR at +0x14 and BSRR at +0x18. Point a pointer of that type at each port's base address, 0x40020000 for port A and 0x40020800 for port C, and pass the pointer to the code that drives the pin. volatile on every member makes each read and write reach the hardware. A register the code never uses still needs its place in the struct, or a reserved member in its stead, so the ones after it keep their offsets; a _Static_assert on offsetof catches a slip.
Practice it: Floor Plan
Initialised globals read 0 at boot, although the startup code copies the data section from flash. The copy's source pointer is a cast of a linker symbol declared as a plain uint32_t. What is wrong?
A linker symbol is an address with nothing of yours stored behind it. Declared as extern uint32_t _etext;, _etext in an expression means the word stored at that address, so (uint32_t *)_etext turns some word of flash into the copy's source pointer, and the copy reads from the wrong place. Declare it as an array, extern uint32_t _etext[];, like the other linker symbols, so its name stands for its address, or write &_etext. The start values of the data section sit in flash from that address, and the loop copies them to RAM, from _sdata up to _edata, before main runs.
Practice it: Cold Start
Firmware written in C++ often turns off exceptions and stops using the heap once it has started. Why?
Both cost time and memory that are hard to bound. Throwing unwinds through tables and code the image has to carry, and how long it takes depends on how deep the calls are. The heap can fail or fragment after weeks of running, and the time one allocation takes varies. So many firmware builds pass -fno-exceptions and allocate everything statically or at start up, and keep the parts of C++ that add little or no run time cost when used with care: classes, templates and constexpr.
Embedded operating systems
5 of 5 jobs
Under a preemptive RTOS, one task prints a report that takes about 175 ms, and another must act at once when an alarm input rises. How do you set their priorities, and what must the alarm task do while it waits?
Give the alarm task the higher priority. With preemption on, a higher priority task that becomes ready runs at the next scheduling point, a tick or the call that wakes it, even in the middle of the report, so the report never holds it up. While it waits, the alarm task must block, for example in FreeRTOS's vTaskDelay between looks at the pin, or on a semaphore an interrupt gives. A high priority task that spins without blocking starves every task below it, the report included.
Practice it: Right of Way
A sampling task takes readings in quick bursts, and a slower task logs each one. Why does an RTOS queue suit this handoff better than one shared variable, and how deep must the queue be?
A queue copies each reading in, in order, and keeps it until the logger takes it, so a reading that comes while the logger is busy waits its turn instead of overwriting the last one, and none is taken twice. In FreeRTOS the logger blocks in xQueueReceive with portMAX_DELAY, so it sleeps until a reading waits. Make the queue deep enough for the longest burst the logger can fall behind on: room for a whole burst of six readings, faster than the log prints them, is safe even if the logger takes none of them in time. The sampler sends with a timeout of 0, so a full queue makes the send fail at once instead of holding up the sampler.
Practice it: Hopper
Two RTOS tasks write lines to one serial console, and the log shows one line broken into the middle of another. How do you keep every line whole?
Make a whole line one task's turn. Guard the console with a mutex: take it before the first character of a line and give it back after the newline, so the other task waits at its take until the line ends. Use a mutex rather than a binary semaphore, because a FreeRTOS mutex lends its holder the priority of a higher priority task waiting on it, so a task of middle priority cannot stall the line. Create it before the scheduler starts, and hold it for one line, not for the work between lines.
Practice it: Handshake
Debugging at the hardware boundary
5 of 5 jobs
A sensor's eight byte frame should land in RAM by DMA, but the buffer holds the frame's last byte in its first place and zeros after it. Which setting do you check first?
Whether the stream steps its memory address. For each item a DMA stream reads one address and writes another, and it steps either address only where its configuration says so. On the STM32F4, MINC, bit 10 of the stream's DMA_SxCR, steps the memory address by one item after each transfer. Left clear, every byte lands in the first place and the last one wins. PINC, bit 9, stays clear, since every byte comes from one address, the peripheral's data register. Set MINC in the configuration write, while the stream is disabled.
Practice it: Intake
Since event lines were added to a logger, its log shows lines run together and digits missing. Each event line is printed from the interrupt handler. Why, and what is the fix?
The handler can run while main is part way through its own printf, and the second call writes into the same output state and the same console mid line, so the two lines mix and characters are lost or repeated. printf is not written to be entered again before it returns. Let the handler only record the event, by adding one to a volatile counter, and have main print an event line for each count it has not printed yet, between its own lines. Then only main ever prints.
Practice it: Crosstalk
A lamp should light only while a button is held. It lights while nobody touches the button and goes out while the button is held. The code tests the pin's bit in the input register. What do you check first?
How the button is wired, before the code. When a resistor pulls the pin up to the supply and the button joins it to ground, the pin reads 1 while the button is up and 0 while it is held: the button is active low. For a button on PA0, a test of GPIOA_IDR & 1u for held is then upside down. Invert it, !(GPIOA_IDR & 1u), in the one function that reads the button, so every caller gets true for held. The schematic, not the signal's name, says which level means pressed.
Practice it: Upside Down
Testing and code review
5 of 5 jobs
A change under review blinks the LED on PA5 by assigning whole values to port A's output register, while other pins of port A drive other circuits. What do you ask for?
Writes that touch PA5 alone. An assignment such as GPIOA_ODR = 1u << 5; writes the output bits of all sixteen pins at once, so it also drives every other output pin of port A low, and GPIOA_ODR = 0; drives them all low. Ask for GPIOA_BSRR: writing 1u << 5 sets PA5 and 1u << 21 clears it, and pins whose bits are 0 do not change, in one write an interrupt cannot split. The mode register needs the same care: clear PA5's two bits, 11 and 10, then set them to 01, output, and leave the rest alone.
Practice it: As Found
Code under review feeds the watchdog from a timer interrupt every 100 ms, so the board never resets. What is the problem?
The timer keeps firing while the main loop is stuck, so the watchdog is fed for a program that has stopped doing its work, and it never resets the board. Feed it from the place that shows the work got done, such as the main loop after each sample is logged, so a hang in that work stops the feeding and the reset comes. Where several tasks must all be alive, each sets its own flag, and one place feeds only when every flag is set, then clears them.
Practice it: Dead Man's Switch
How do you test a driver's timeout path when the hardware on your bench never times out?
Put the driver's register access behind a thin layer a test can replace, such as a struct of registers in plain memory or a few small functions, and have the test leave the ready flag clear so the wait runs out. Then check what the driver returns and what it leaves behind: a status that says timeout rather than stale data, and the peripheral in a state the next call can use. Count the timeout from a tick or timer the test controls, not from a delay loop.