cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F2xx FSMC address bus assignment

fpeelo
Associate II
Posted on May 23, 2014 at 16:07

One thing I have not been able to find in the datasheet: if the FSMC is being used to access 16-bit memory, what does A0 do?

I'm a bit confused about this.

If BCR.MWID is 00 => 8-bit data width, you have to address individual bytes. So the STM32F is able to access bytes, which means A0 is the least significant bit of the byte address. So it's 0 for even byte addresses (e.g. A000 0000) and 1 for odd byte addresses (A000 0001).

So if 16-bit memory was attached, and MWID=01 => 16-bit accesses, A0 would not be needed, and A1 would be the least significant address line. A1 would be 0 for even word addresses (A000 0000), 1 for odd word addresses (A000 0002). At least, this was the case on a previous MCU (from another manufacturer) that I used before.

Am I right to expect this, or does the address bus get shifted 1 bit up when BCR.MWID = 01, so A0 becomes the lsb of a word address instead of byte?
2 REPLIES 2
Posted on May 23, 2014 at 17:29

From RM0033 (rev4), table 163:

In case of a 16-bit external memory width, the FSMC will internally use HADDR[25:1] to generate the

address for external memory FSMC_A[24:0].

Whatever the external memory width (16-bit or 8-bit), FSMC_A[0] should be connected to external memory

address A[0].
fpeelo
Associate II
Posted on May 23, 2014 at 18:51

> From RM0033 (rev4), table 163:

Thanks a lot! I suspected that was the case but didn't find the reference in the manual.

Now to warm up the soldering iron... :\