Home > other >  After stm32f103 extended SDRAM stack space partitioning problem
After stm32f103 extended SDRAM stack space partitioning problem

Time:09-18

Due to internal sram is only 64 KB size, in order to run a function, so the extended the external 1 MB sdram, the starting address of 0 0 x100000 x68000000 size, so that with external sram just like with internal sram, need not oneself apply for memory, also need not consider what memory address, all lets the compiler to resolve,
According to library routines implemented FSMC expand external sdram, the system_stm32f10x function in the library. The c of the initialization file has actually initialization of an external SRAM, we just add "# define DATA_IN_ExtSRAM 1" this macro definition

# if defined (STM32F10X_HD) | | (defined STM32F10X_XL) | | (defined STM32F10X_HD_VL)
/* # define DATA_IN_ExtSRAM */
# define DATA_IN_ExtSRAM 1
# endif

Compile time again will compile initialization of an external SRAM, the initialization code you can go to the file of void SystemInit_ExtMemCtl (void) the function,
One problem is that the function of internal array is allocated in the external sdram space there is no problem, but sp pointer (automatically assigns the stack area is not big, in the process of function calls, stack space to sp value less than 0 x68000000, so ask, external sdram, where stack interval size set? Is still automatically assigned, if automatic allocation should not appear in the process of the function call stack space is not enough ah,,,

CodePudding user response:

To the top! Correction: STM32F1 can only drive an SRAM, unable to drive the SDRAM, from a professional point of view, the building Lord some description is not quite right, but does not affect the understanding,

CodePudding user response:

reference 1st floor qq_20553613 response:
help top! Correction: STM32F1 can only drive an SRAM, unable to drive the SDRAM, from a professional point of view, the building Lord some description is not quite right, but does not affect the understanding,



Thanks to this problem is solved now, but in the external SRAM as a result of running time takes too long, very practical, from time to time for internal SRAM space problem is really have a headache, and,

CodePudding user response:

refer to the second floor cyxiaotian1988 response:
Quote: refer to 1st floor qq_20553613 response:

To the top! Correction: STM32F1 can only drive an SRAM, unable to drive the SDRAM, from a professional point of view, the building Lord some description is not quite right, but does not affect the understanding,



Thanks to this problem is solved now, but in the external SRAM as a result of running time takes too long, very practical, from time to time for internal SRAM space problem is really a headache,,

Will be more slowly than internal in theory, but not too obvious, check the FSMC bus clock, the problem such as speed,

CodePudding user response:

reference qq_20553613 reply: 3/f
Quote: refer to the second floor cyxiaotian1988 response:

Quote: refer to 1st floor qq_20553613 response:

To the top! Correction: STM32F1 can only drive an SRAM, unable to drive the SDRAM, from a professional point of view, the building Lord some description is not quite right, but does not affect the understanding,



Thanks to this problem is solved now, but in the external SRAM as a result of running time takes too long, very practical, from time to time for internal SRAM space problem is really a headache,,

Will be more slowly than internal in theory, but not too obvious, check the FSMC bus clock, the problem such as speed,


Ok ~ check the MDK about clock Settings, no configuration and chip clock, time is wrong, so the SEC statistics external SRAM running in time and meet the requirements, thank you ~

CodePudding user response:

Thanks to this problem is solved now, but in the external SRAM as a result of running time takes too long, very practical, from time to time for internal SRAM space problem is really have a headache, and,

CodePudding user response:

The building Lord met outside enlarge SRAM cases, peripheral hardware error, such as the CAN communication cause hardware error, this kind of situation?

CodePudding user response:

Could you tell me how to solve the problem of the original poster is? Need additional configuration stack
  • Related