Keil Logo

Interfacing STM32 with External 512kx16 SRAM, 8bit data only accessible per one address of RAM

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
vishal patel
Posted
25-Feb-2017 10:47 GMT
Toolset
ARM
New! Interfacing STM32 with External 512kx16 SRAM, 8bit data only accessible per one address of RAM

Hi,I have STM32F4 interfaced with the external SRAM sized 512kx16 array. Now what I believe is (Pls correct me if i am wrong), Pointing to Every incremental Address should give me 16bit data. because SRAM is interfaced with 16bit wide data bus (non multiplexed)

For Example: 0x64000000 is the base address of my external SRAM. And I want to write hello, to this RAM, then It should happen like...
on 0x64000000 location, data should be written, 'H' 'E' &
on 0x64000001 location, data should be written, 'L' 'L' &
on 0x64000002 location, data should be written, 'O' 0xff .
And the same is should be getting in read back.

But What actually occurs is
on 0x64000000 location, data should be written, 'H' 'E' &
on 0x64000001 location, data should be written, 'E' 'L' &
on 0x64000002 location, data should be written, 'L' 'L' &
on 0x64000003 location, data should be written, 'L' 'O' &
on 0x64000004 location, data should be written, 'O' 0xff . So If I want to get the write data, I will have to read back 16 bit data from location 0x64000000, 0x64000002, and 0x64000004.

Can Anyone Has the experience of interfacing 512kx16bit array SRAM ? and facing the similar issues ??

Read-Only
Author
Robert McNamara
Posted
25-Feb-2017 17:33 GMT
Toolset
ARM
New! RE: Interfacing STM32 with External 512kx16 SRAM, 8bit data only accessible per one address of RAM

Yes, you can only access 8-bits of data per address.

No, incrementing the address by one does not move you to the next 16-bit item, it moves you to the next byte.

Given what you describe here, it looks like the FMC is setup properly and the processor is talking to the SRAM properly.

The whole reason for the FMC is to make the memory as transparent as possible to your program.

To write "HELLO" to the SRAM do the following:

strcpy( (char *) 0x64000000,"HELLO");
Read-Only
Author
vishal patel
Posted
27-Feb-2017 06:49 GMT
Toolset
ARM
New! RE: Interfacing STM32 with External 512kx16 SRAM, 8bit data only accessible per one address of RAM

Thanks For Reply,

I am using AS6C8016, which is 512kx16bit array SRAM. It has A0-A18 Address bus, so technically I can address only 524287 location, lets say 512K, And now according to you, If I can access 1 byte only per one location, then How can I access 1 MByte memory, [which is as per their data sheet, 8,388,608-bit/8MBit/1Mbyte].
It has UB/LB control pins too, but I think It is for the 16bit-data bus access control only. Not for the Memory array control of the SRAM right ?

Read-Only
Author
Robert McNamara
Posted
27-Feb-2017 14:32 GMT
Toolset
ARM
New! RE: Interfacing STM32 with External 512kx16 SRAM, 8bit data only accessible per one address of RAM

You configure the FMC to make this work properly. The FMC can be configured to access 8-bit memory, 16-bit memory and 32-bit memory. This is the key to your questions.

Read-Only
Author
Srujan G L
Posted
13-Nov-2017 08:09 GMT
Toolset
ARM
New! RE: Interfacing STM32 with External 512kx16 SRAM, 8bit data only accessible per one address of RAM

Hi Vishal,
I have the same issue, but with a 1Gbit NOR Flash
it has a 16bit wide data bus and has an address range of 0x00 to 0x3FFFFFF
so each address should point to a 16bit data, but it is only pointing to 8bit
so i'm able to utilize 1half of 1Gbit=512Mbit.
If u have found any solution please share!!
Thank You.

Next Thread | Thread List | Previous Thread Start a Thread | Settings

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.