cancel
Showing results for 
Search instead for 
Did you mean: 

External Addressing question

kb
Associate II
Posted on November 26, 2012 at 14:05

I am using a STM32F4 FSMC to address external 16-bit SRAM on a custom board.  Everything is OK.

I want to connect an external FPGA and I'm not so clear about the actual addressing.

Please correct me if I'm being stupid, the MCU is 32bit, but the internal AHB address bus is bytewise.  The external address bus is 16-bit, so A0 addresses 2 x 16-bit locations.

Therefore to access say

0x00000004 & 0x00000005 A0=1 A1=1 A2=0

0x00000000 & 0x00000001 A0=0 A1=0 A2=0

0x00000002 & 0x00000003 A0=1 A1=0 A2=0

Or is it bytewise

0x00000000 A0=0 A1=0 A2=0

0x00000001 A0=1 A1=0 A2=0

Or is it 32-bit wide as the 16-bit words are read in in 2 cycles

0x00000000 A0=0 A1=0 A2=0

0x00000004 A0=1 A1=0 A2=0

2 REPLIES 2
Posted on November 26, 2012 at 14:22

> I am using a STM32F4 FSMC to address external 16-bit SRAM on a custom board. 

You should then have noticed, how the memory is connected and how the registers are set.

The short answer is, that it depends on whether you use 8-bit or 16-bit access.

The long answer is, that you should read the fine manual. As you apparently plan to use the NORFlash/PSRAM mode (in the plainest SRAM/ROM variant), you should read 32.4.1 (especially the note under Tab.184), the second part of Tab.192 in 32.5.2 and the description of MWID bits in register FSMC_BCRx.

Did this clean up the picture a bit?

JW

kb
Associate II
Posted on November 26, 2012 at 15:22

32.4.1 (Rev 3) was the part I needed (overlooked) thanks