Bit-Banding - ARM Cortex-M3 Technical Reference Manual

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

Advertisement

4.2

Bit-banding

ARM DDI 0337B
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 Cortex-M3 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.
is the starting address of the alias region
bit_band_base
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, 2006 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
0xFFFFFF*32
maps to bit 0 of the bit-band byte at
0x22000000
+ (0*32) + 0 *4
maps to bit 7 of the bit-band byte at
0x2200001C
+ (0*32) + 7*4.
Memory Map
:
0x200FFFFC
:
0x200FFFFC
:
0x20000000
:
0x20000000
4-5

Advertisement

Table of Contents
loading

Table of Contents