SAM3N0C Atmel Corporation, SAM3N0C Datasheet - Page 63

no-image

SAM3N0C

Manufacturer Part Number
SAM3N0C
Description
Manufacturer
Atmel Corporation
Datasheets
10.5.8
10.6
10.6.1
10.6.1.1
10.6.1.2
10.6.1.3
10.6.1.4
10.6.2
10.6.2.1
11011A–ATARM–04-Oct-10
Exception model
Programming hints for the synchronization primitives
Exception states
Exception types
Inactive
Pending
Active
Active and pending
Reset
ANSI C cannot directly generate the exclusive access instructions. Some C compilers provide
intrinsic functions for generation of these instructions:
Table 10-8.
The actual exclusive access instruction generated depends on the data type of the pointer
passed to the intrinsic function. For example, the following C code generates the require
LDREXB operation:
This section describes the exception model.
Each exception is in one of the following states:
The exception is not active and not pending.
The exception is waiting to be serviced by the processor.
An interrupt request from a peripheral or from software can change the state of the correspond-
ing interrupt to pending.
An exception that is being serviced by the processor but has not completed.
An exception handler can interrupt the execution of another exception handler. In this case both
exceptions are in the active state.
The exception is being serviced by the processor and there is a pending exception from the
same source.
The exception types are:
Reset is invoked on power up or a warm reset. The exception model treats reset as a special
form of exception. When reset is asserted, the operation of the processor stops, potentially at
any point in an instruction. When reset is deasserted, execution restarts from the address pro-
Instruction
LDREX, LDREXH, or
LDREXB
STREX, STREXH, or
STREXB
CLREX
__ldrex((volatile char *) 0xFF);
C compiler intrinsic functions for exclusive access instructions
unsigned int __ldrex(volatile void *ptr)
int __strex(unsigned int val, volatile void *ptr)
Intrinsic function
void __clrex(void)
SAM3N
63

Related parts for SAM3N0C