Ram clear after reset

Hello,
I am working on a project based on STM32F103VC microcontroller. I tried to find any resource/discussion/application note on clearing of internal SRAM after reset (i.e. initialization of SRAM). Although the topic seems trivial, it is strange that I was unable to find any resource nor example. I tried to investigate startup_stm32f10x_x.s files to find relevant routine without success. Could you please provide information/examples/advices how to clear internal SRAM after reset, what is the best way. If it has to be done in the startup file - plese, suggest an example. Could we use memset function called in the initialisation function before main and how to implement it in a problem-free manner (and any examples?)?
Thanks in advance

Parents
  • The C/C++ runtime environment normally clears all RAM as long as the RAM is part of the project. If you have RAM regions not specified to belong to the project, then you need to clear them yourself. If you have RAM regions that requires the hardware to be properly initialized to be able to access the RAM, then your startup code must make sure to make those RAM regions accessible - so setting up DRAM controllers, powering on peripherials with own RAM regions etc.

Reply
  • The C/C++ runtime environment normally clears all RAM as long as the RAM is part of the project. If you have RAM regions not specified to belong to the project, then you need to clear them yourself. If you have RAM regions that requires the hardware to be properly initialized to be able to access the RAM, then your startup code must make sure to make those RAM regions accessible - so setting up DRAM controllers, powering on peripherials with own RAM regions etc.

Children
More questions in this forum