Memory Checking Process - Freescale Semiconductor DSP56800E User Manual

Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

Two immediate reads from different memory locations & compare
1. All memory is filled with test value (0xAAAA)
0xAAAA
2. Each memory location is read and compared with written value
0xAAAA
3. Another test value (0x5555) is written. Then two consecutive locations are read
0x5555
TEST2: the newly written location is read & compared with 0x5555
TEST3: the second location should still contain the previous value (0xAAAA)
In case if any of the three tests fails, the application execution is halted by debughlt and stop
instructions.
The compile-time warning is issued when the internal memory checking is activated in targets
that do not use the internal memory.
/* internal RAM memory test */
#ifdef INTXRAM_CHECK_ENABLED
#ifndef TARGET_DATA_INTRAM
#warning Internal Memory Checking is active but variables go elsewhere
#endif
move.l
#>>_Linternal_RAM_addr,r1
move.l
#>>_Linternal_RAM_size,r2
move.w
CONFIG_INTRAM_CHECKVALUE1, x0
move.w
CONFIG_INTRAM_CHECKVALUE2, y0
move.w
#0,b
rep r2; move.w x0,x:(r1)+
move.l
#>>_Linternal_RAM_addr,r1
do
r2,end_intramcheck1
move.w C1,X:(R5)
move.w D1,X:(R5)
cmp.w
x:(r1),x0
beq <t1passed
debughlt
t1passed:
move.w
y0,x:(r1)
move.w x:(r1+1),y1
FREESCALE SEMICONDUCTOR
0xAAAA
0xAAAA
0xAAAA
0xAAAA
TEST1: read & compare with 0xAAAA
0xAAAA
0xAAAA
Both locations are read
Figure 2-3. Memory Checking Process
/* TEST2: write test2 */
/* read from incremented address (see TEST3) */
Targeting 56F8xxx Platform
0xAAAA
0xAAAA
0xAAAA
0xAAAA
0xAAAA
0xAAAA
/* memory pointer */
/* memory size */
/* x0=write/test value 1 */
/* y0=write/test value 2; */
/* b0=0, b1 will be used as "b" */
/* fill memory with value test1 */
/* initialize verify memory pointer */
/* start verify loop */
/* clear COP watchdog counter */
/* TEST1: read & compare */
/* TEST1: OK ? */
Boot Sequence
0xAAAA
0xAAAA
0xAAAA
2-47

Advertisement

Table of Contents
loading

Table of Contents