What the interviewer wants
- On-flash format
- Write path and recovery after power loss
- Wear and lifetime analysis
Constraints
- NOR: 4 KB erase sectors, 256-byte program pages, about 100k erase cycles per sector
- Sector erase takes up to 400 ms; page program about 1 ms
- Average 2 events per minute, bursts of 200 per second for 2 seconds during a fault
- Each event: timestamp, type, 0 to 24 bytes of payload
- 64 KB RAM available to the logger
If you ask the interviewer
- Is there a hold-up capacitor? No. Assume the supply can vanish mid-write.
- Must every event survive? Events fully written before power loss must survive. The event being written may be lost, but must not corrupt anything else.
- Do we have a file system? No file system today. You may propose one if you justify it.
- Is a real-time clock available? Yes, with a backup battery, but it can be wrong after a battery change.
How it's graded
The rubric a senior interviewer would use. Each item is scored 0 to 3 and weighted.
| Record and sector format | weight 3 |
| Power-loss recovery | weight 3 |
| Wear levelling and lifetime | weight 2 |
| Bursts and latency | weight 2 |
| Ordering, timestamps and download | weight 1 |
| Validation | weight 2 |
How to structure your answer
- Requirements and assumptions: the numbers that drive the design.
- Architecture: blocks, tasks, data flow, memory.
- Key decisions and trade-offs, with the alternatives you rejected.
- Failure modes and recovery.
- Testing and validation.
More design rounds
Write your design in five sections and get it graded against this rubric, with a follow-up question from the AI interviewer.
Answer this round