Bird
0
0

Given the following code snippet, what will happen when the SysTick timer reaches zero?

medium📝 Analysis Q4 of 15
ARM Architecture - Exception and Interrupt Model
Given the following code snippet, what will happen when the SysTick timer reaches zero?
SysTick->LOAD = 1000 - 1;
SysTick->VAL = 0;
SysTick->CTRL = 7;
ASysTick exception triggers periodically every 1000 clock cycles
BPendSV exception triggers immediately
CNo exception triggers because CTRL is incorrectly set
DHardFault exception occurs due to invalid VAL
Step-by-Step Solution
Solution:
  1. Step 1: Analyze SysTick configuration

    LOAD is set to 999, VAL cleared to 0, CTRL set to 7 (enable, tick interrupt, clock source).
  2. Step 2: Understand effect

    SysTick counts down from 999 to 0, then triggers SysTick exception periodically.
  3. Final Answer:

    SysTick exception triggers periodically every 1000 clock cycles -> Option A
  4. Quick Check:

    SysTick timer setup = periodic interrupt [OK]
Quick Trick: SysTick CTRL=7 enables periodic interrupts [OK]
Common Mistakes:
  • Thinking PendSV triggers on SysTick underflow
  • Assuming CTRL=7 is invalid
  • Believing HardFault occurs on VAL=0

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More ARM Architecture Quizzes