Topic : Using external RAM with STR9

Forum : ARM

Original Post
Post Information Post
March 13, 2007 - 9:44am
Raisonance Support Team

This has been copied from another thread to form a new topic, as it changes the subject of the discussion:
Original topic:
http://www.raisonance.com/Forum/punbb/viewtopic.php?id=2158
Original message from jimp:

thanks Vincent, MBS for your clarification. I guess that I should change the title of this thread as it provides misleading information regarding to the RIDE.

Unfortunately, I tried and not able to change the title. Too bad.

As you might already know, I am not an experienced ARM assembler guy. However, I have to figure out how to use external SRAM in my project. I am using the STR91x REVA board. I wonder if you or any experienced savy can point me into a right direction. Documentation or sample codes or ideas on how I can try it out are all welcomed. Samples on similiar architecture(s) are also helpful.

In particular, I believe the following three questions are among the most I anxiously want the answers.

1) how to set up the external memory layout in the crt0_STR91x.s file?

2) How and what to initialize in c main source code to enable the external memory communication? I know the EMI and its clocks should be initialized.

3) How to read- or write-access to the external memory in c source codes after it is correctly setup?

By the way, I am going to use 128k x 8 bit Asynchronous SRAM, here is the link to the SRAM http://www.st.com/stonline/stappl/produ … RNP139=122

The SRAM connects to the STR91x MCU in a 8-bit non-multiplexed EMI configuration.

Many Thanks in advanced,

Jim

Replies
Post Information Post
+1
0
-1
March 13, 2007 - 9:58am
Raisonance Support Team

Hi,

And now the answer: :)

I'm not an expert in using this kind of features, so I won't be able to answer everything. I'll ask someone from ST to answer. In the meantime, here is what I can say:

1) It's mostly the linker script, not the startup, that you need to understand. But you shouldn't need to modify it much, because I already included the external memory in it. (I couldn't test it though) Look at the "Getting Started STRx" for how to retrieve the default linker script and startup.

2) I'll let ST support answer that. My guess is you just need to call "EMI_Init" in "STR9_EMI.c" from the lib. (with the correct parameters, which is the hard part!)

3) I'll let ST support answer that. My guess is that once it's initialized, you can access it like any other memory. (Flash, RAM, ...)

Sorry for the incomplete answers.

Best Regards,

Vincent

+1
0
-1
March 13, 2007 - 8:46pm
Guest

thanks Vincent for your quick response.

I would appreciate very much if you can get ST guys give me guidance over the external memory issue. I am eagerly waiting for the answers.

In the meantime, I will also file for a technical online support with ST over this issue. If I get any hints or solutions, I will also post them here. However, with my past experiences dealing with them, it might take them a long time to get back to me. I wish you can get back some answers quicker with your exisiting contacts.

Many Thanks and highly appreciated with your assistance.

Jim

+1
0
-1
March 14, 2007 - 9:50am
Raisonance Support Team

Hi,

Here is the answer from ST...

Best Regards,

Vincent

Here is an example of initialisation for using a non-multiplexed external memory (SRAM):
ftp://www.raisonance.com/pub/forum/STR9_EMI_example/main.c

Please note:

GPIO5 is used as chip select
GPIO7 is used for data transmission on 8 bits.

Keep the configuration of the wait stat as is because it is optimized.

If buffered mode is not activated, the last part can be removed.

+1
0
-1
March 14, 2007 - 6:42pm
Guest

Super!!!!

Thanks vincent greatly for your fast and quality answer. I will test the code along with startup code, and linker scripts as soon as I receive my REVA kit.

I have a 2nd question that is related to the manipulation of the code image to the flash memory. I need your superior guidance too. Please read my new thread.

Thanks greatly,

Jim

+1
0
-1
July 11, 2008 - 2:12pm
Guest

Hello

i'm using str912 with EMI with Rlink-std
i want to explore the content of the external memory
when debugging i see ----

is there any way to do it ?

Thanks
Norbert