Bit-Banding - ARM Cortex-M3 Technical Reference Manual

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

Advertisement

4.2

Bit-banding

ARM DDI 0337G
Unrestricted Access
The processor memory map includes two bit-band regions. These occupy the lowest
1MB of the SRAM and Peripheral memory regions respectively. These bit-band regions
map each word in an alias region of memory to a bit in a bit-band region of memory.
The memory map has two 32-MB alias regions that map to two 1-MB bit-band regions:
Accesses to the 32-MB SRAM alias region map to the 1-MB SRAM bit-band
region.
Accesses to the 32-MB peripheral alias region map to the 1-MB peripheral
bit-band region.
A mapping formula shows how to reference each word in the alias region to a
corresponding bit, or target bit, in the bit-band region. The mapping formula is:
bit_word_offset = (byte_offset x 32) + (bit_number × 4)
bit_word_addr = bit_band_base + bit_word_offset
where:
is the position of the target bit in the bit-band memory region.
Bit_word_offset
is the address of the word in the alias memory region that maps to
Bit_word_addr
the targeted bit.
Bit_band_base
is the starting address of the alias region.
is the number of the byte in the bit-band region that contains the
Byte_offset
targeted bit.
is the bit position (0-7) of the targeted bit.
Bit_number
Figure 4-2 on page 4-6 shows examples of bit-band mapping between the SRAM
bit-band alias region and the SRAM bit-band region:
The alias word at
=
0x23FFFFE0
0x22000000
The alias word at
=
0x23FFFFFC
0x22000000
The alias word at
0x22000000
=
0x22000000
The alias word at
=
0x2200001C
0x22000000
Copyright © 2005-2008 ARM Limited. All rights reserved.
maps to bit [0] of the bit-band byte at
0x23FFFFE0
+ (
) + 0*4.
0xFFFFF*32
maps to bit [7] of the bit-band byte at
0x23FFFFFC
+ (
) + 7*4.
0xFFFFF*32
maps to bit [0] of the bit-band byte at
0x22000000
+ (0*32) + 0 *4.
0x2200001C
maps to bit [7] of the bit-band byte at
+ (
) + 7*4.
0*32
Non-Confidential
Memory Map
:
0x200FFFFF
:
0x200FFFFF
:
0x20000000
0x20000000
:
4-5

Advertisement

Table of Contents
loading

Table of Contents