HW Interview
EM-04 · Chapter 8 · Low-Speed Interfaces & Embedded Hardware

Power-on to main(): what takes time?

A safety output must reach a defined state almost as soon as power is applied (assume 100 µs), and someone also asks for a boot message "right away". What happens between power-on and the first line of main(), and how do you guarantee each requirement?

Level●● onsite technical
TrackEmbedded & wearables
Really testingBring-up sequence from rails to code.
Full worked answer: in the book, page 208 — what to say first, how to explain it, the numbers worth quoting and the follow-ups. About the book →

Going deeper

Extra explanation that is not in the book: worked numbers, where people go wrong, and how to say it in the room.

A realistic timeline from power-on.

So "a boot message right away" means hundreds of milliseconds at best on an MCU.

Designing the safe state. GPIOs are high-impedance in reset. A 10 kΩ pull-down on the gate of the output FET holds it off from the first microsecond. If the safe state must be "on", invert the logic in hardware so that the resistor gives "on".

Where people go wrong: promising a time in firmware that is shorter than the supervisor's reset delay.

Errata

No corrections known for this question. All errata

Ask about this question

Stuck on a step, or think something is wrong? Send it with EM-04 in the subject. Good questions get answered on this page, and corrections go into the next printing.

Ask about EM-04

Related

← EM-03 Drive a solenoid valve from a GPIOEM-05 Reset pin design →