Interrupt Response

Interrupt response is defined as the time between the reception of the interrupt and the start of the user code that handles the interrupt. The interrupt response time accounts for all the overhead involved in handling an interrupt. Typically, the processor's context (CPU registers) is saved on the stack before the user code is executed.

For a foreground/background system, the user ISR code is executed immediately after saving the processor's context. The response time is given by Equation [2.3].

Interrupt latency + Time to save the CPU's context

For a non-preemptive kernel, the user ISR code is executed immediately after the processor's context is saved. The response time to an interrupt for a non-preemptive kernel is given by Equation [2.4].

Interrupt latency + Time to save the CPU's context

For a preemptive kernel, a special function provided by the kernel needs to be called. This function notifies the kernel that an ISR is in progress and allows the kernel to keep track of interrupt nesting. For nC/OS-n, this function is called OSIntEnter (). The response time to an interrupt for a preemptive kernel is given by Equation [2.5].

[2.5] Interrupt latency

+ Time to save the CPU's context + Execution time of the kernel ISR entry function

A system's worst case interrupt response time is its only response. Your system may respond to interrupts in 50jj.s 99 percent of the time, but if it responds to interrupts in 250jj.s the other 1 percent, you must assume a 250jj.s interrupt response time.

Was this article helpful?

0 0

Post a comment