2014-08-13 01:55 AM
Hi,
I am unable to run the example STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\FSMC\SRAM_DataMemory on my STM3210E-EVAL Board. Although I have made the following settingsBut still the code is unable to execute. Attached zip file is the complete project folder.
regards, Nick.2014-08-13 08:07 AM
2014-08-13 08:24 AM
Does The STM32F1xx series have FSMC in the first place ? ....... I do not think so .
High Density series of parts.2014-08-13 12:41 PM
Hi clive,
I have gone through this document and have successfully compiled the following STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\FSMC\SRAM_DataMemory example using the MDK-ARM toolchain. But it seems the code is not running. Can anyone please look at the attached file and let me know if I am missing something?.2014-08-13 01:24 PM
Make sure your initial stack point is NOT in external memory which hasn't been configured/initialized yet.
You need your own project localized version of startup_stm32f1_whatever.s...
__Vectors DCD 0x20002000 ; Top of Stack MUST be in valid RAM, __main will change to __initial_sp later
DCD Reset_Handler ; Reset Handler
DCD NMI_Handler ; NMI Handler
DCD HardFault_Handler ; Hard Fault Handler
DCD MemManage_Handler ; MPU Fault Handler
DCD BusFault_Handler ; Bus Fault Handler
DCD UsageFault_Handler ; Usage Fault Handler
...
Failing this you'll need to describe ''not working'' in some CPU centric way using the debugger to identify what is actually happening.
I'm not sure of the wisdom of NOT using Internal SRAM, one realistically should floor plan the memory use so the fast internal RAM is used as much as possible, and the SLOW external memory is only used for things which are too big to fit, and the performance penalty is understood. Putting the stack in external memory is a very unwise as it will significantly degrade performance of all code running.
2014-08-13 01:50 PM
The 'F103 has an FSMC. The STM3210E board has a 16 bit NOR flash, 8 bit NAND flash, 16-bit SRAM and LCD controller on the FSMC. The NOR is a Spansion GL128P90FFIR2, 8M x 16 on the NE2 chip select, at 0x6400 0000. It has a RDY/WAIT on PD2 to time erases.
Jack Peacock2014-08-14 11:28 PM
Hi clive,
What I have observed is that the stack initial pointer is also in the external RAM. Although it should have been in the internal RAM address. Can you please help me out where am I going wrong. Thestack initial pointer address in startup_stm32f10x_hd.s file is defined at 0x20000 Attached file contains the complete MDK-ARM code. ________________ Attachments : STM32F10x_StdPeriph_Template.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0mS&d=%2Fa%2F0X0000000bgF%2FegaBovFr7v8hkut31DY_xl2VIIu2i2_7YsM6SsoM2Ik&asPdf=false2014-08-15 08:30 PM
The .MAP suggests the stack is still in the external memory. You can't do it with an equate, you'll need to use a scatter file which defines both internal and external memory, and direct the stack into the segment/section which is in internal RAM.
2014-08-18 02:57 AM
Hi Clive,
I have finally achieved the result by modifying the scatter file. Now the Map file is showing that the STACK is in internal memory. Thanks for your support. Just one more query. I am unable to run other GPIO and UART when I use the external RAM. Whereas if I use internal RAM, then the code runs perfectly. Kindly check the attached project. I am running the code on my STM3210E-EVAL. regards, Nick ________________ Attachments : STM32F10x_StdPeriph_Template.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0np&d=%2Fa%2F0X0000000bgC%2FpbbqxD5JfPhxbRHjDL21kPp_LHno1ikL.r0ZdhQFYiM&asPdf=false