Author Topic: How to interface STM32F429IGT with an external SDRAM?  (Read 1305 times)

0 Members and 1 Guest are viewing this topic.

Offline OMSTopic starter

  • Newbie
  • Posts: 1
  • Country: ir
How to interface STM32F429IGT with an external SDRAM?
« on: August 16, 2018, 07:39:04 am »
Hi,
I’m trying to connect an external SDRAM (part no. K4S561632N) to STM32F429IGT. For that, I am using STM32CubeMX to generate the code. You can see the initialization of the external SDRAM from the link below:

https://www.dropbox.com/sh/x7pyqu6vszr1u6k/AAC_cxp3f1kb0GIjDp1nMSU9a?dl=0

The IDE that I am using currently is Keil uVision 5. For writing to the SDRAM, I used the stm32f4xx_hal_sdram driver, but unfortunately using the write function “HAL_SDRAM_Write_8b(…)” writes the variables in the internal RAM.
Do I need to configure something else in Keil? Or does something need to be changed in the scatter file?

Thanks in advance,
OMS
« Last Edit: August 16, 2018, 07:41:36 am by OMS »
 

Offline capt bullshot

  • Super Contributor
  • ***
  • Posts: 3033
  • Country: de
    • Mostly useless stuff, but nice to have: wunderkis.de
Re: How to interface STM32F429IGT with an external SDRAM?
« Reply #1 on: August 16, 2018, 07:55:52 am »
Sounds a bit strange to use a function to write data to the external SDRAM.
After initialization one would use a pointer to access the RAM since it's in the memory address range, or use some compiler specific attributes to place data there and leave the linker do the rest. Don't know anything about how to do that with the Keil tools, but in general, you'd have to define this in the linker files.
Safety devices hinder evolution
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4784
  • Country: pm
  • It's important to try new things..
Re: How to interface STM32F429IGT with an external SDRAM?
« Reply #2 on: August 17, 2018, 06:56:50 am »
Do you use a DRAM or SDRAM?? Double check that..
When the FMC is configured properly your SDRAM will be accessible as the "internal ram" in a specific segment of ram memory (depends on the bank you have chosen).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf