cancel
Showing results for 
Search instead for 
Did you mean: 

Clear SRAM at startup

ezanen9
Associate II
Posted on March 21, 2006 at 06:01

Clear SRAM at startup

2 REPLIES 2
ezanen9
Associate II
Posted on March 14, 2006 at 07:31

Hi all,

To catch undefined program counter jumps to the SRAM I want to fill my hole SRAM with 0xFFFFFFFF(undefined instruction) before my C-program is entered. This way the unused (large) area of SRAM will not generate undefined behaviour when the corrupted PC jumps to it.

I think that the only way to do this is to clear SRAM in the init.s.

But in the init.s I can only write assembly code. Because I am not able to write this I have the following question:

Does someone have an example, tips or a ready to use piece of assembly code that clears the hole SRAM with 0xFFFFFF that I can put in the init.s?

Thanks,

Jimmey

ezanen9
Associate II
Posted on March 20, 2006 at 05:42

Hi and thanks RISC,

But is this code for the STR710 MCU?

My compiler doesn't think so!

I checked the assembly code and I can not find it in the instruction set for my MCU. (ARM7TDMI downloaded from www.ARM.com)

To clear my question:

I like to fill the hole SRAM starting at 0x20000000 with 0xFFFFFFF in my startup.s/init.s file.

Regards,

Jimmey