User`s guide
xPC Target™ Interrupts
When a hardware interrupt occurs, the generated code uses the following steps
for each device on this IRQ to determine which device generated the interrupt:
1 Call the PreHook function, if one exists. The return value determines the
action.
2 The generated code determines whether this device generated the interrupt.
• If the
PreHook function returns XPC _RUN_ISR, execution continues to
step 3.
• If the
PreHook function returns XPC_DROP_ISR, the generated code goes
to step 5.
3 The generated code determines whether the Async IRQ Source block has a
function-call subsystem connected.
• If so, the generated code calls the interrupt service function-call
subsystem. When the interrupt service function subsystem returns, the
generatedcodegoestostep4onpage5-5.
• If this board is configured to run the mode l, and th is board did in te rrupt,
send a wakeup call to the model thread. The model thread does not
immediately execute. It waits until after all the boards that use this IRQ
have been checked and the return from the interrupt has been executed.
4 Call the PostHook function, if one exists. If one does not exist, the
generated code g oe s to step 5.
5 The generated code checks whether another device using the same IRQ
exists in the system.
If so, execution returns to the beginning of step 1.
If no other device exists, generated code goes to step 6.
6 Returns from the interrupt.
The xPC Target kernel now runs the highest priority thread. The highest
priority ready thread is the model if a wakeup call was sent to it.
5-5