This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MCBSTM32F400 external ram

I'm using the Keil MCBSTM32F400 development board and I'd like to start using the external SRAM.

From the user's guide the SRAM uses the following pins and is at the following location:
SRAM FSMC_NE3 / PG10 0x68000000 - 0x681FFFFF

I'm having trouble accessing the memory. When trying to write, nothing happens and when reading back I always get 0xFF.

Does anyone have an example of setting up the FSMC for the Keil development board to use its external SRAM?

Is there a Keil example application that shows how to use the memory?

What I've tried so far:

In the standard system_stm32f4xx.c file, I enabled the external memory by defining DATA_IN_ExtSRAM (uncommenting).

In the SystemInit_ExtMemCtl() function I commented out three lines where they were directly configuring the FSMC_Bank1 timing and control registers; uncommented the FSMC_NORSRAMInitStructure; changed FSMC_Bank1_NORSRAM2 to FSMC_Bank1_NORSRAM3; called teh FSMC_NORSRAMInit() function with the structure; and finally added a call to FSMC_NORSRAMCmd() to enable.

I did not change any of the GPIO alternate function setup from what is in the standard system file.

I have not looked into the timing settings for the SRAM on the Keil board vs. the timing for the G_EVAL board external SRAM to see if they're different enough to change.

Any help would be greatly appreciated.

0