cancel
Showing results for 
Search instead for 
Did you mean: 

Init SRam with Zero for SRamParityChecking

klaus2
Associate II
Posted on October 31, 2014 at 14:09

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 
0
x
00000400
AREA STACK, NOINIT, READWRITE, ALIGN=
3
; How to init with zero ?
Stack_Mem SPACE Stack_Size
__initial_sp
......
.....
;*******************************************************************************
; User Stack and Heap initialization
;*******************************************************************************
IF :DEF:__MICROLIB
EXPORT __initial_sp
EXPORT __heap_base
EXPORT __heap_limit
ELSE
IMPORT __use_two_region_memory
EXPORT __user_initial_stackheap
__user_initial_stackheap
LDR R
0
, = Heap_Mem
LDR R
1
, =(Stack_Mem + Stack_Size)
LDR R
2
, = (Heap_Mem + Heap_Size)
LDR R
3
, = Stack_Mem ; Maybe I can initialize them here with zero ?
BX LR
ALIGN
ENDIF

#sram #paritycheck #stm32f0
10 REPLIES 10
Posted on October 31, 2014 at 18:13

Can anyone from ST provide any more details on the parity/hamming schemes used on RAM and FLASH in the parts?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..