
AT32F413
Series Reference Manual
2022.06.27
Page 28
Rev 2.00
1.1.2
Bit band
By using bit-band regions, read and write access to a single bit can be performed through common
load/store operations. The Cortex
®
-M4F memory includes two bit-band regions: the lowest 1MByte of
SRAM and the lowest 1MByte of peripherals. In addition to access to bit-band addresses, their respective
bit-band alias area can be used to access to any bit of any address. The bit-band alias area transforms
each bit into a 32-bit word. Thus, accessing to one bit in the alias area has the same effect as read-
modify-write operation on the bit in the bit-band region.
Figure 1-3 Comparison between bit-band region and its alias region: image A
0x2000_0000
0x2000_0004
0x2000_0008
0x2000_0000
0x200F_FFFC
Bit
0
8
16
24
31
0x2000_0000
0x2000_0010
0x2000_002C
0x2000_0080
bitband region address
(total 1M bytes)
bitband alias
region address
Figure 1-4 Comparison between bit-band region and its alias region: image B
0
bitband alias region
(total 32M bytes)
0x2000_0000
0x2000_0001
0x2000_0002
0x2000_0003
0x2200_001C
1
2
3
4
5
6
7
0x2200_0018
0x2200_0014
0x2200_0010
0x2200_000C
0x2200_0008
0x2200_0004
0x2200_0000
0x200F_FFFC
0x200F_FFFD
0x200F_FFFE
0x200F_FFFF
0
1
2
3
4
5
6
7
0
1
2
3
4
5
6
7
0
1
2
3
4
5
6
7
0
1
2
3
4
5
6
7
0
1
2
3
4
5
6
7
0
1
2
3
4
5
6
7
0
1
2
3
4
5
6
7
0x23FF_FFE0
0x23FF_FFE4
0x23FF_FFE8
0x23FF_FFEC
0x23FF_FFF0
0x23FF_FFF4
0x23FF_FFF8
0x23FF_FFFC
bitband region
(total 1M bytes)
Bit-band region: address area supporting bit-band operations
Bit-band alias region: access to the alias region has the same effect as read-modify-write operation on
the bit-band region
Each bit in the bit-band region is mapped into a word (LSB) of the alias region. When accessing to the
address in the bit-band alias region, such address is transformed into the bit-band address. For a read
operation, read one word in the bit-band region, then move the required bit to the right to LSB, and then
return the LSB. For a write opearation, first move the targeted bit to the left to the corresponding bit
number, then perform read-modify-write operation on bit level.