All jobs / Embedded / hardware / RTOS

Embedded / hardware interview question · 1–3 years

A task should sample every 10 ms. It sleeps for 10 ms at the end of each pass, and over minutes the period slips.

What is wrong?

The strongest answer

A plain delay counts from the moment you call it, so the work time is added to every period; the delay-until form sleeps to an absolute next-wake time and holds the period

Why it works

Right — delay-until anchors to the previous wake time, so jitter stops accumulating into drift.

What a good answer covers

Answers that fall short

Who gets asked this

More RTOS questions