ARM Cortex-M3 Technical Reference Manual page 181

R2p0
Hide thumbs Also See for Cortex-M3:
Table of Contents

Advertisement

ARM DDI 0337G
Unrestricted Access
Table 8-21 System Handler Control and State Register bit assignments
Bits
[10]
[9]
[8]
[7]
[6:4]
[3]
[2]
[1]
[0]
The active bits indicate if any of the system handlers are active, running now, or stacked
because of pre-emption. This information is used for debugging and is also used by the
application handlers. The pend bits are only set when a fault that cannot be retried has
been deferred because of late arrival of a higher priority interrupt.
Caution
You can write, clear, or set the active bits, but you must only do this with extreme
caution. Clearing and setting these bits does not repair stack contents nor clean up other
data structures. It is intended that context switchers use clearing and setting to save a
thread's context, even when in a fault handler. The most common case is to save the
context of a thread that is in an SVCall handler or UsageFault handler, for undefined
instruction and coprocessor emulation.
The model for doing this is to save the current state, switch out the stack containing the
handler's context, load the state of the new thread, switch in the new thread's stacks, and
then return to the thread. The active bit of the current handler must never be cleared,
because the IPSR is not changed to reflect this. Only use it to change stacked active
handlers.
As indicated, the SVCALLPENDED and BUSFAULTPENDED bits are set when the
corresponding handler is held off by a late arriving interrupt. These bits are not cleared
until the underlying handler is actually invoked. That is, if a stack error or vector read
error occurs before the SVCall or BusFault handler is started, the bits are not cleared.
This enables the push-error or vector-read-error handler to choose to clear them or retry.
Copyright © 2005-2008 ARM Limited. All rights reserved.
Field
PENDSVACT
-
MONITORACT
SVCALLACT
-
USGFAULTACT
-
BUSFAULTACT
MEMFAULTACT
Non-Confidential
Nested Vectored Interrupt Controller
Function
Reads as 1 if PendSV is active.
Reserved
Reads as 1 if the Monitor is active.
Reads as 1 if SVCall is active.
Reserved
Reads as 1 if UsageFault is active.
Reserved
Reads as 1 if BusFault is active.
Reads as 1 if MemManage is active.
8-31

Advertisement

Table of Contents
loading

Table of Contents