
AT32F413
Series Reference Manual
2022.06.27
Page 29
Rev 2.00
The address ranges of two Flash memories supporting bit-band operations:
The lowest 1 Mbyte of the SRAM: 0x2000_0000~0x200F_FFFF
The lowest 1 Mbyte of peripherals: 0x4000_0000~0x400F_FFFF
For a bit in the SRAM bit-band region, if the byte address is A, the bit number is n (0<=n<=7), then the
alias address where the bit is :
AliasAddr = 0x22 (A-0x2000_0000)*32+n*4
For a bit in the peripheral bit-band region, if the byte address is A, the bit number is n (0<=n<=7), then
the alias address where the bit is:
AliasAddr = 0x42 (A-0x4000_0000)*32+n*4
shows the mapping between bit-band region and alias region in SRAM:
Table 1-1 Bit-band address mapping in SRAM
Bit-band region
Equivalent alias address
0x2000_0000.0
0x2200_0000.0
0x2000_0000.1
0x2200_0004.0
0x2000_0000.2
0x2200_0008.0
…
…
0x2000_0000.31
0x2200_007C.0
0x2000_0004.0
0x2200_0080.0
0x2000_0004.1
0x2200_0084.0
0x2000_0004.2
0x2200_0088.0
…
…
0x200F_FFFC.31
0x23FF_FFFC.0
shows the mapping between bit-band region and alias region in peripheral area:
Table 1-2 Bit-band address mapping in the peripheral area
Bit-band region
Equivalent alias address
0x4000_0000.0
0x4200_0000.0
0x4000_0000.1
0x4200_0004.0
0x4000_0000.2
0x4200_0008.0
…
…
0x4000_0000.31
0x4200_007C.0
0x4000_0004.0
0x4200_0080.0
0x4000_0004.1
0x4200_0084.0
0x4000_0004.2
0x4200_0088.0
…
…
0x400F_FFFC.31
0x43FF_FFFC.0
In terms of bit-band operation, one of the advantages is to control LED ON/OFF independently via GPIO
pins. On the other hand, it brings great conveninence for serial interface operations. In short, it is best
suited to hardware I/O-intensive low-level applications.
In addition, bit-band operations can also simplify jump process. When jump operation is based on a bit
level, the previous steps are:
Read the whole register