Datasheet
61
11011B–ATARM–21-Feb-12
SAM3N
Reading a word in the alias region:
•
0x00000000
indicates that the targeted bit in the bit-band region is set to zero
•
0x00000001
indicates that the targeted bit in the bit-band region is set to 1
10.5.5.2 Directly accessing a bit-band region
“Behavior of memory accesses” on page 57 describes the behavior of direct byte, halfword, or
word accesses to the bit-band regions.
10.5.6 Memory endianness
The processor views memory as a linear collection of bytes numbered in ascending order from
zero. For example, bytes 0-3 hold the first stored word, and bytes 4-7 hold the second stored
word. or “Little-endian format” describes how words of data are stored in memory.
10.5.6.1 Little-endian format
In little-endian format, the processor stores the least significant byte of a word at the lowest-
numbered byte, and the most significant byte at the highest-numbered byte. For example:
10.5.7 Synchronization primitives
The Cortex-M3 instruction set includes pairs of synchronization primitives. These provide a non-
blocking mechanism that a thread or process can use to obtain exclusive access to a memory
location. Software can use them to perform a guaranteed read-modify-write memory update
sequence, or for a semaphore mechanism.
A pair of synchronization primitives comprises:
10.5.7.1 A Load-Exclusive instruction
Used to read the value of a memory location, requesting exclusive access to that location.
10.5.7.2 A Store-Exclusive instruction
Used to attempt to write to the same memory location, returning a status bit to a register. If this
bit is:
0: it indicates that the thread or process gained exclusive access to the memory, and the write
succeeds,
1: it indicates that the thread or process did not gain exclusive access to the memory, and no
write is performed,
The pairs of Load-Exclusive and Store-Exclusive instructions are:
• the word instructions LDREX and STREX
Memory Register
Address A
A+1
lsbyte
msbyte
A+2
A+3
07
B0B1B3 B2
31 24 23 16 15 8 7 0
B0
B1
B2
B3