Datasheet
174
11011B–ATARM–21-Feb-12
SAM3N
10.21.8 Configuration and Control Register
The CCR controls entry to Thread mode and enables:
• the handlers for hard fault and faults escalated by FAULTMASK to ignore bus faults
• trapping of divide by zero and unaligned accesses
• access to the STIR by unprivileged software, see “Software Trigger Interrupt Register” on
page 161.
See the register summary in Table 10-30 on page 164 for the CCR attributes.
The bit assignments are:
• STKALIGN
Indicates stack alignment on exception entry:
0 = 4-byte aligned
1 = 8-byte aligned.
On exception entry, the processor uses bit[9] of the stacked PSR to indicate the stack alignment. On return from the excep-
tion it uses this stacked bit to restore the correct stack alignment.
• BFHFNMIGN
Enables handlers with priority -1 or -2 to ignore data bus faults caused by load and store instructions. This applies to the
hard fault and FAULTMASK escalated handlers:
0 = data bus faults caused by load and store instructions cause a lock-up
1 = handlers running at priority -1 and -2 ignore data bus faults caused by load and store instructions.
Set this bit to 1 only when the handler and its data are in absolutely safe memory. The normal use of this bit is to probe sys-
tem devices and bridges to detect control path problems and fix them.
• DIV_0_TRP
Enables faulting or halting when the processor executes an SDIV or UDIV instruction with a divisor of 0:
0 = do not trap divide by 0
1 = trap divide by 0.
When this bit is set to 0,a divide by zero returns a quotient of 0.
• UNALIGN_TRP
Enables unaligned access traps:
0 = do not trap unaligned halfword and word accesses
31 30 29 28 27 26 25 24
Reserved
23 22 21 20 19 18 17 16
Reserved
15 14 13 12 11 10 9 8
Reserved STKALIGN BFHFNMIGN
76543210
Reserved DIV_0_TRP
UNALIGN_T
RP
Reserved
USERSETM
PEND
NONBASET
HRDENA