<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Ram clear after reset</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/30834/ram-clear-after-reset</link><description> 
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</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Ram clear after reset</title><link>https://community.arm.com/thread/92421?ContentTypeID=1</link><pubDate>Fri, 14 Feb 2014 08:51:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:262a2e51-a8a7-4f91-85e6-c235bf7d0c8d</guid><dc:creator>Westonsupermare Pier</dc:creator><description>&lt;p&gt;&lt;p&gt;
startup_stm32f1xx.s&lt;/p&gt;

&lt;pre&gt;
; ...
; Reset handler
Reset_Handler   PROC
                EXPORT  Reset_Handler
                IMPORT  SystemInit
                IMPORT  __main

                LDR     R0, =0x20000000
                LDR     R1, =0x2000C000 ; 48KB
                LDR     R2, =0xE5E5E5E5 ; Fill Pattern
RAM_Init_Loop
                STR     R2, [R0], #4 ; *R0++ = R2
                CMP     R0, R1
                BNE     RAM_Init_Loop

; The __main routine resets the stack pointer, and then initialize the static area
;  it then CLEARS all the space between there and the stack.

                LDR     R0, =SystemInit
                BLX     R0

                LDR     R0, =__main
                BX      R0
                ENDP ; Reset_Handler

;...
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ram clear after reset</title><link>https://community.arm.com/thread/68532?ContentTypeID=1</link><pubDate>Fri, 14 Feb 2014 01:28:27 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9c44eac2-48e4-422e-b709-d5834e1eafdc</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
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.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>