cancel
Showing results for 
Search instead for 
Did you mean: 

How to read and write form/to SDRAM MEMORY in STM32f429 controller

ashwinidigajerla
Associate II
Posted on April 25, 2014 at 08:27

stm32f429-DISCO board have 8MB of on chip SDRAM module.I want to interface SDRAM chip to microcontroller.I finished the initilization part.Now I wish to write and read data from it.

8MB SDRAM memory was organized as 4 internal banks 1MB each.How i write/read to total

 8MB with Single write/read command to SDRAM instead of individual internal bank Access.

Thank you

#whiskey-tango-foxtrot
25 REPLIES 25
ashwinidigajerla
Associate II
Posted on May 19, 2014 at 15:14

good evening

 I have a basic doubt regarding SPI protocal

STM32f407 has 3 SPI's 

STM32f429 has 6 SPI's

I am unable to analize the how many slaves can be connected to controller in both of above cases.

Many of saying that using SPI we can connect any number of slaves.How it is possible?IF one SPI can interface any number of slaves then what is the need of providing 3SPI's or 6SPI's .

I am a fresher.first time working on this protocal

Can you provide any information regarding this?

Thanks

ashwinidigajerla
Associate II
Posted on July 19, 2014 at 13:53

good evening 

Interfacing SDRAM memory to stm32f429

I configured the all things properly.

BUT i am unable to write to the memory base address 0xD0000000

How i would test whether the clock is supplied or not to external SDRAM chip.

expecting any solution to my problem

thank you

Posted on July 19, 2014 at 15:40

Does it work with the standard library code, and configured for your SDRAM device?

I searched on some of your defines and got nowhere, who wrote that?

Are you using Bank2 or Bank1 in your design? How about a schematic?

Set up the code to access the SDRAM in a loop, and use an OSCILLOSCOPE, you will be particularly interested in the Clock, RAS, CAS pins
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
nicholas2
Associate
Posted on September 06, 2014 at 21:19

Hey,

I'm not able to get this example to work for the amount of memory that should be available in SDRAM (8MB or 0x800000). In fact, the maximum I seem to be able to get is 2MB, adding 1 word (4 bytes) beyond that makes it so that the values read from sdram are not the same as those that were written. Please refer to the code here:

https://github.com/mondaugen/stm32-fmc-test-2

and navigate to src/main.c to see what I mean. Let me know if you can see what is wrong. Thanks.

Posted on September 07, 2014 at 01:40

Sounds like you've not got the BANK pins of the the SDRAM setup correctly. I'd wade through your code, but none of the pin stuff is commented.

PG4 BA0

PG5 BA1
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
nicholas2
Associate
Posted on September 09, 2014 at 07:33

Hey thanks, that fixed the problem. This is adapted from the STM32Cube_FW_F4_V1.1.0/Projects/STM32F429I-Discovery/Examples/FMC/FMC_SDRAM/Src/stm32f4xx_hal_msp.c example. It seems the documentation at the top of the file is incomplete, because they forget to list PG4,5 among all the other pins they say to connect, but do indeed set them up in the actual code.