Memory Endianness; Synchronization Primitives; Figure 10. Little-Endian Example - ST STM32F3 Series Programming Manual

Hide thumbs Also See for STM32F3 Series:
Table of Contents

Advertisement

The Cortex-M4 processor
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
Directly accessing a bit-band region
Behavior of memory accesses on page 30
or word accesses to the bit-band regions.
2.2.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.
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. See
for an example.
2.2.7

Synchronization primitives

The Cortex-M4 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:
Load-Exclusive instruction: used to read the value of a memory location, requesting
exclusive access to that location.
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: the thread or process gained exclusive access to memory, and the write succeeds.
1: the thread or process did not gain exclusive access to memory, and no write is
performed.
34/262

Figure 10. Little-endian example

Memory
7
0
Address A
B0
lsbyte
A+1
B1
A+2
B2
A+3
B3
msbyte
PM0214 Rev 10
describes the behavior of direct byte, halfword,
Register
31
24 23
16 15
B3
B2
B1
PM0214
Figure 10
8 7
0
B0

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F3 Series and is the answer not in the manual?

Questions and answers

Table of Contents