Bit-band region: address region for 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 a bit-band region is mapped into a word (LSB) in an alias region. When accessing to the
address in a bit-band alias region, such address is transformed into a bit-band address first. For a read
operation, read one word in the bit-band region, and then move the targeted bit to the right to LSB before
returning LSB. For a write operation, first move the targeted bit to the left to the corresponding bit number,
then perform a read-modify-write operation on bit level.
The address ranges of two memories supporting bit-band operations:
The lowest 1 Mbyte of the SRAM: 0x2000_0000~0x200F_FFFF
The lowest 1 Mbyte of the 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 = 0x2200_0000+ (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 = 0x4200_0000+ (A-0x4000_0000)*32+n*4
Table 1-1 shows the mapping between bit-band region and alias region in SRAM:
Table 1-1 Bit-band address mapping in SRAM