Hi,
I can read/write an external sdram using fmc in stm32f429. But working with address and read/write functions is not proper for my purpose. I want to introduce external sdram as if internal sram is clearly extended and whenever I define a big variable it is projected to external sdram automatically.
I checked stm32f4 cubemx repository examples (SDRAM+DATAMEMORY) and searched a lot but it seems this is not straightforward.
Following these steps based on what I found, I get hardfault after system_init.
1) Defining external sdram address and size in the linker (off-chip ram)
2) Adding some code in startup_stm32f420xx.s
3) Defining DATA_IN_ExtSDRAM for initializing sdram before main function
4) Enabling system clock before main function
My external sdram is connected to SDRAM1 in stm32f429.
What is the correct procedure? Is SystemInit_ExtMemCtl() function implemented correctly? Is any modification needed? Is enabling clock before main function and after system_init needed?
Can anyone tell what is the correct code step by step?
Thanks in advance.
Hello, I've moved your query to the Keil forum. However you are more likely to get a meaningful reply from the STM32 forum. I recommend posting there, if you have not already.
https://community.st.com/s/topic/0TO0X000000BSqSWAW/stm32-mcus