cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing with External Flash

siddj
Associate II
Posted on November 06, 2008 at 13:50

Interfacing with External Flash

7 REPLIES 7
siddj
Associate II
Posted on May 17, 2011 at 12:50

I haven't worked with ARM processors before and I have to work on it for an undergoing project. I have to interface STM32F103_LQFP100 with an external Flash, Micron 64Gb(MT29F64G). Currently i have been browsing through the Data sheets from Micron and the Ref Manual for STM-32F10xx. I have figured out that I would need to work with the FSMC and FSMC_PCR2 register?

I am having trouble understanding the timing computations needed to interface with the external flash. I haven't worked with flash memory either so I was wondering if anyone could point me towards more elaborate documentation on interfacing with flash. Also can anyone tell me where can I find some sample/example programs that work with external flash?

christophe239955_st
Associate II
Posted on May 17, 2011 at 12:50

some example programs for NAND, NOR, SRAM are provided in

http://www.st.com/mcu/modules.php?name=mcu&file=familiesdocs&FAM=110#Firmware

Some hints for timing computation are in the AN2784: Using the high-density STM32F10xxx FSMC peripheral to drive external memories.

Chris :o

[ This message was edited by: christophe.beyen on 03-11-2008 22:27 ]

jj
Associate II
Posted on May 17, 2011 at 12:50

Believe that you will be greatly assisted by acquiring ST's new EVAL ''E'' Development Board. Included are a variety of different external memories and software examples for the access of each. Nor & Nand Flash are both supported by this board - and key signals are brought to headers so that you can experiment with external memory chips - such as your Micron. (not sure that you can address ''all'' of its 64GB)

siddj
Associate II
Posted on May 17, 2011 at 12:50

THANKS A BUNCH Chris,

The STM32F10 FWLib document proved helpful! I could not find any examples but under the FSMC and Flash Memory sections there are C functions that can be used to access/address the FSMC and FLASH registers ( I don't know if thats what you meant by examples?). I was wondering if the Flash memory registers are to be used only for on board flash on the MCU or do i need it for external memory interface as well. All this time I was thinking i only had to deal with FSMC_PCR2 register but after seeing the flash registers I am not sure if I also need to use them for external memory?

Also I am having a lot of trouble with the addresses/locations used in the Micron Flash memory chip. Any help on how to program or take into account those addresses would be a great help.

I am sorry but I am just a newbie and have never worked with any of these chips before! PLEASE HELP!

I would really appreciate a response. I thank you for your help. :D

siddj
Associate II
Posted on May 17, 2011 at 12:50

I don't think I would be discretely working with the components, I am going to have to work on a PC board which will have external flash interfaced with it. I can get hold of a demo board but I don't think it's the same board as you mentioned. If you do happen to have that board, is there a way I could get hold of the examples probably text files?

I appreciate the help.

jj
Associate II
Posted on May 17, 2011 at 12:50

This site is loaded with resources - try this:

exit the forum - click on microcontrollers

from microcontrollers click on STM32

from STM32 click on Documents & Applications (or similar)

This page is packed with data - keep scrolling down till

you locate the EVAL ''E'' listing. You can download a

PDF file describing the Eval board's operation as well as

a zip file with actual code - some of which achieves the

read/write of external flash.

You ''cannot'' learn this overnight. Many of us have spent

months of study - this forum is a great resource. Good luck...

siddj
Associate II
Posted on May 17, 2011 at 12:50

So I tried working through the fsmc_nand.c and fsmc_nand.h and main.c files which interface with the on board external flash drive(NAND512W3A2)on the Eval Board. Although I have loads of questions regarding that, I am really quite stuck at the timing computations. The AN2784 document which interfaces high density devices with external memories has a computation example. Here is the formula for computing Hold time.

HOLD = max(tch, talh,tclh)/HCLK

here are the values tch=5ns

talh = 5ns

tclh = 5ns

HCLK = 72 Mhz.

They have calculated hold time to be 0x02 (how many nano seconds is that?)

I just don't know how to solve this equation when it is expressed in terms of 3 constants? If anyone has done calculations for flash memories before please help me out. All of you are of great help.

Thanks.