Embedded Systems Fundamentals · Interview question

What is SysTick and why do RTOSes use it?

A strong answer

SysTick is a simple 24-bit down-counter built into every ARM Cortex-M core (it's part of the core itself, in the system/PPB region, not a vendor peripheral). It counts down from a reload value to zero at the core clock rate, reloads, and fires the SysTick exception, giving a periodic tick. RTOSes use it as their scheduler time base because it's standardized across every Cortex-M device: a kernel like FreeRTOS can rely on SysTick existing and behaving the same way on any vendor's chip, so the port stays portable, while vendor timers (TIM2, etc.) differ between families. It's also conveniently tied to the system clock and has a dedicated, fixed exception slot. The tradeoff is it's basic, 24-bit, no capture/compare/PWM, so application timing that needs those features uses the full-featured general-purpose timers, and SysTick is reserved for the OS tick or a simple millis() counter.

What a weak answer sounds like

You know the answer. Do you know what gets you dinged?

Pro breaks down the answer most candidates actually give to this question — and the specific reason an interviewer marks it down. It’s the difference between sounding correct and sounding senior, on all 472 questions.

From the lesson

Timers & Counters

Count clock ticks to make precise time: prescaler and auto-reload set the period, and output-compare/input-capture modes generate and measure waveforms, with no CPU delay loops.

More Timers & Counters questions

Browse all 472 interview questions
What is SysTick and why do RTOSes use it? | EmbeddedPrep.io