Embedded Systems · Problem type

CPU time in an interrupt

Use this for “An interrupt fires at 10 kHz and its ISR takes 20 μs. What share of the CPU does it use?”

Diagram

0%20%40%60%80%100%02040608010020 μs
20% of 100 μs is 20 μs.
This is an example. Type your own values to start a new problem.
T (μs)
=
1
÷
r (kHz)
U (%)
=
tISR (μs)
÷
T (μs)

Formulas

T
=
1,000
r
100
=
1,000
10
U
=
100
×
tISR
T
20
=
100
×
20
100

Assumptions

•
Interrupts arrive at a steady rate and each ISR run takes the same time, entry and return included.
•
The CPU load is the ISR time over the time between interrupts, as a percent.
•
The ISR must finish before the next interrupt, so the load stays under 100%.

Step-by-step

WE KNOW
r = 10 kHz, tISR = 20 μs
FIND
time between interrupts (T), CPU load (U)
Step 1 · Find time between interrupts (T)
Use T = 1,000 ÷ r
The time between interrupts is one over the rate; 1000 turns 1/kHz into μs.
T
=
1,000
10
T
=
100
μs
Step 2 · Find CPU load (U)
Use U = 100 × tISR ÷ T
The ISR time over the time between interrupts, as a percent.
U
=
100
×
20
100
U
=
2,000
100
U
=
20%
Check
Put the numbers back in. Both sides should match.
100
=
1,000
10
✓
20
=
100
×
20
100
✓
Topic check
See what you know: 5 questions on this topic
New questions each time. Pass to mark it complete.

Related lessons

© 2026 SME. All rights reserved.