Cortex M3 DSP/BIOS Register Usage
This document provides a table describing the various Cortex M3 targets register conventions in terms of preservation across multi-threaded context switching and preconditions.
Overview
In a multi-threaded application using DSP/BIOS, it is necessary to know which registers can or cannot be modified. Furthermore, users need to understand which registers need to be saved/restored across a function call or an interrupt.
The following definitions describe the various possible register handling behaviors:
- Scratch register. These registers are saved/restored by the Hwi dispatcher with temporary register bit masks.
- Preserved register. These registers are saved/restored during a Task context switch.
- Initialized register. These registers are set to a particular value during Hwi processing and restored to their incoming value upon exiting from the interrupt routine.
- Read-Only register. These registers may be read but must not be modified.
- Global register. These registers are shared across all threads in the system. To make a temporary change, save the register, make the change, and then restore it.
- Other. These registers do not fit into one of the categories above.
Register Conventions