-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
ARM?? Cortex?? M4 Cookbook
By :
ARM Cortex interrupt handlers can be programmed completely in C, but programmers coding time-critical applications prefer to use assembler (some programmers claim, rather ambitiously, that their hand-crafted assembler programs run up to 30-times faster than compiler generated code, but I suspect that the actual figure is 2-3 times).
When an interrupt (also known as an exception) occurs, the processor responds by performing the following actions:
R0-R3, R12, link register (LR), program counter (PC), and program status (PSR) onto the stackThe eight words pushed onto the stack are collectively known as the Stack Frame (illustrated later). These are referred to as caller-saved registers by the (AAPCS), and so the exception executes exactly as a C function. If the processor is in privileged...