AnsweredAssumed Answered

Init SRam with Zero for SRamParityChecking

Question asked by LookUpTable on Oct 31, 2014
Latest reply on Oct 31, 2014 by Clive One
I use STM32F030F4 and want to use SRam-parity-checking. The reference manual hints:

"When enabling the RAM parity check, it is advised to initialize by software the whole RAM
memory at the beginninng of the code, to avoid getting parity errors when reading non-
initialized locations."

I found in the startup_stm32f0xx.s(code below) something what maybe has something to with it. I think the SRAM is divided into 4 sections: data, bss, heap and stack. How could I initialize these sections for correct parity checking ? Sorry, Iam not really familiar with this basic things in ?Assembler?

Stack_Size      EQU     0x00000400
                AREA    STACK, NOINIT, READWRITE, ALIGN=3 ; How to init with zero ?
Stack_Mem       SPACE   Stack_Size
; User Stack and Heap initialization
                 IF      :DEF:__MICROLIB
                 EXPORT  __initial_sp
                 EXPORT  __heap_base
                 EXPORT  __heap_limit
                 IMPORT  __use_two_region_memory
                 EXPORT  __user_initial_stackheap
                 LDR     R0, =  Heap_Mem
                 LDR     R1, =(Stack_Mem + Stack_Size)
                 LDR     R2, = (Heap_Mem +  Heap_Size)
                 LDR     R3, = Stack_Mem ; Maybe I can initialize them here with zero ?
                 BX      LR