How to execute a memory test?

Hi,

I'm using the STM32F103ZE uC developping in C and asked to implement a full internal ram memory test.
The memory runs from address 0x2000 0000 up to 0x2000 FFFF.

When main() is started allready the stackpointer and data are initialized so some memory locations are occupied.

Just my thoughts: I could create some assembler function that checks/writes/reads the non occupied free memory, then copy the occupied memory to the allready tested free memory, then test the occupied memory, then restore the occupied memory from the free memory.

Is there some other way to test the memory before the uC initializes the memory?

Thanks

Henk

Parents
  • > Is there some other way to test the memory before the uC initializes the memory?

    Execute the test within the reset handler, after initializing memory controllers and before branching to __main(). Since you don't use memory at this point, it is possible to use destructive tests which makes the process a lot faster. What type of errors are you looking for specifically? For a catch-all kind of thing I recommend googling "cocktail march" or "marchcw" tests.

    --
    Marcus
    http://www.doulos.com/arm/

Reply
  • > Is there some other way to test the memory before the uC initializes the memory?

    Execute the test within the reset handler, after initializing memory controllers and before branching to __main(). Since you don't use memory at this point, it is possible to use destructive tests which makes the process a lot faster. What type of errors are you looking for specifically? For a catch-all kind of thing I recommend googling "cocktail march" or "marchcw" tests.

    --
    Marcus
    http://www.doulos.com/arm/

Children
More questions in this forum