Figure 9. Bit-Band Mapping - ST STM32F4 Series Programming Manual

Cortex-m4
Hide thumbs Also See for STM32F4 Series:
Table of Contents

Advertisement

The Cortex-M4 processor
Where:
Bit_word_offset is the position of the target bit in the bit-band memory region.
Bit_word_addr is the address of the word in the alias memory region that maps to the
targeted bit.
Bit_band_base is the starting address of the alias region.
Byte_offset is the number of the byte in the bit-band region that contains the targeted
bit.
Bit_number is the bit position, 0-7, of the targeted bit.
Figure 9 on page 32
alias region and the SRAM bit-band region:
The alias word at 0x23FFFFED maps to bit[0] of the bit-band byte at
0x200FFFFF: 0x23FFFFED = 0x22000000 + (0xFFFFF*32) + (0*4).
The alias word at 0x23FFFFFC maps to bit[7] of the bit-band byte at
0x200FFFFF: 0x23FFFFFC = 0x22000000 + (0xFFFFF*32) + (7*4).
The alias word at 0x22000000 maps to bit[0] of the bit-band byte at
0x20000000: 0x22000000 = 0x22000000 + (0*32) + (0 *4).
The alias word at 0x2200001C maps to bit[7] of the bit-band byte at
0x20000000: 0x2200001C = 0x22000000+ (0*32) + (7*4).
0x23FFFFFC
0x2200001C
7
6
7
6
Directly accessing an alias region
Writing to a word in the alias region updates a single bit in the bit-band region.
Bit[0] of the value written to a word in the alias region determines the value written to the
targeted bit in the bit-band region. Writing a value with bit[0] set to 1 writes a 1 to the bit-
band bit, and writing a value with bit[0] set to 0 writes a 0 to the bit-band bit.
Bits[31:1] of the alias word have no effect on the bit-band bit. Writing 0x01 has the same
effect as writing 0xFF. Writing 0x00 has the same effect as writing 0x0E.
32/260
shows examples of bit-band mapping between the SRAM bit-band

Figure 9. Bit-band mapping

0x23FFFFF8
0x23FFFFF4
0x22000018
0x22000014
5
4
3
2
1
0
7
6
5
0x200FFFFF
0x200FFFFE
5
4
3
2
1
0
7
6
5
0x20000003
0x20000002
DocID022708 Rev 6
32MB alias region
0x23FFFFF0
0x23FFFFEC
0x22000010
0x2200000C
1MB SRAM bit-band region
4
3
2
1
0
7
6
5
4
0x200FFFFD
4
3
2
1
0
7
6
5
4
0x20000001
0x23FFFFE8
0x23FFFFE4
0x23FFFFE0
0x22000008
0x22000004
0x22000000
3
2
1
0
7
6
5
4
3
0x200FFFFC
3
2
1
0
7
6
5
4
3
0x20000000
PM0214
2
1
0
2
1
0

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

This manual is also suitable for:

Stm32l4+ seriesStm32f3 series

Table of Contents

Save PDF