cancel
Showing results for 
Search instead for 
Did you mean: 

Migration Problem using SDRAM on STM32F429 Discovery

Embedded Engineer
Associate II
Posted on May 17, 2017 at 17:22

Hi,

I have already started implementing my application on an STM32F429-Discovery Board. Today, I received my custom pcb which uses the same SDRAM (ISSI IS42S16400J) with a slightly different configuration/pinout.

Instead of using SDNE1 and SDNCKE1 (PB5/6), I am using SDNE0 and SDNCKE0. 

At the very start of the project, I am planning to use the discovery board source files. In order to get everything up and running on my board, I adjusted the pin configuration in the stm32f429i_discovery_sdram.c to use my pinout. Below, the relevant lines of code are shown. (The complete file can be downloaded from st's website)

/*-- GPIOs Configuration -----------------------------------------------------*/

/*

+-------------------+--------------------+--------------------+

| PC3 <-> FMC_SDCKE0|

| PC2 <-> FMC_SDNE0 |

| PC0 <-> FMC_SDNWE |

+-------------------+

*/

/* GPIOC configuration */

GPIO_InitStructure.Pin = GPIO_PIN_0|GPIO_PIN_2|GPIO_PIN_3;

HAL_GPIO_Init(GPIOC, &GPIO_InitStructure);

However, I get HardFault_Handler errors. I am assuming that something is going wrong in the init process. 

My question is: From the datasheet I've been assuming that SDNE and SDCKE are only select signals; meaning that I only have to change the pins, but do not have to touch the address space and other init routines. Am I totally wrong or can anyone guess what I have overlooked?

#stm32-f4 #stm32f4-discovery #stm32 #sdram-fmc
1 REPLY 1
Posted on May 17, 2017 at 17:36

The memory banks at a different address, and will need different settings when setting up the SDRAM

ie SDRAM will be at 0xC0000000 not 0xD0000000, FMC_Bank1_SDRAM, not FMC_Bank2_SDRAM, and bit in SDCMR

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..