cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f446re nucleo board bit band ALIAS range

Disha
Associate II

I have few doubts as follows:

1. Each MEMORY MAPPED ADDRESS is how many bytes wide? 1 or 4 bytes (I think it as 1 byte).

2. The ST datasheet for stm446xx says the SRAM is of 128Kb size then,start and end addresss is 0x20000000 to 0x2001FFFF but, bit band alias region starts from 0X22000000 upto 0x23FFFFFF then, the bit band start address is exceeding the end address of available SRAM. Can anyone please explain this i.e how do we use bit band region then ?

5 REPLIES 5
  1. 4 bytes (= 1 word)
  2. The bit-band alias region for the physically implemented 128kB SRAM in fact extends from 0x22000000 to 0x223FFFFF. The rest of the area is unimplemented (i.e. the logic to calculate alias address is still there, but there's no physical SRAM).

JW

Disha
Associate II

Thanks JW,

  1. IF 4 bytes then, as per datasheet :

(for example: lets consider FLASH mem region which is of 512Mb) start address: 0X00000000 end region: 1FFFFFFFX (536870911d)

TOTAL locations(address) = 536870912. And SIZE of these locations = 512Mb = 536870912bytes. Hence Size per location is: 536870912/536870912 = 1byte.

Which means ,

address location :0x00000000 =1byte,

location 0x00000001 =1 byte,..so on

Where am I wrong in this calculation?

2.Meaning if there is no physical SRAM for alias region how can we do bit-banding?. Can you please elaborate more.

Disha
Associate II

Thanks JW,

  1. IF 4 bytes then, as per datasheet :

(for example: lets consider FLASH mem region which is of 512Mb) start address: 0X00000000 end region: 1FFFFFFFX (536870911d)

TOTAL locations(address) = 536870912. And SIZE of these locations = 512Mb = 536870912bytes. Hence Size per location is: 536870912/536870912 = 1byte.

Which means ,

address location :0x00000000 =1byte,

location 0x00000001 =1 byte,..so on

Where am I wrong in this calculation?

2.Meaning if there is no physical SRAM for alias region how can we do bit-banding?. Can you please elaborate more.

Each 32-bit word in the 0x22000000 address space translates to a bit in the 0x20000000 space.

ie 0x22000004​ accesses the second bit at 0x20000000

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
TDK
Guru

The reference manual gives a nice example of how to use the bit banding region:

0693W000003PAgKQAW.png

FLASH is not bit banded. Only SRAM1 and SRAM2.

If you feel a post has answered your question, please click "Accept as Solution".