We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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.
Are you wanting ALL of your variables to use the external RAM, or just a single variable?
I will explain: I'm using RT-RTX and graphics library emWin (from Segger). Memory for this all you need much. Accordingly, I would like to expand the memory external SRAM memory. So I wish that RT-RTX and emWin could use for their needs external memory. And, of course, that I could put some of my variables to external memory, but that it was not noticeable to me.