CodeWarrior mini-flexbus memory test method

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CodeWarrior mini-flexbus memory test method

1,022 Views
boogy
Contributor III

Dear friends of the Freescale Forum,

 

Although I am grateful for the intelligent tools that Freescale has developed for compiling very efficient code, sometimes I am frustrated when the intelligence prevents me from executing redundant tasks like testing my static ram array attched to the mini-flex bus.

During the development stage I discovered that if compiling under global optimization of 4 the intelligence would prevent me from taking a value, writing to memory and reading it back again.

It would ignore the code altogether because I guess it felt it was reduntant.

To circumvent the intelligence I wrote the following code:

uint_16 test_memory(void){  mem_slct[0] = (uint_8 *)0x100ffff0 ; mem_slct[1] = (uint_8 *)0x101ffff2 ; mem_slct[2] = (uint_8 *)0x102ffff4 ; mem_slct[3] = (uint_8 *)0x103ffff6 ; mem_slct[4] = (uint_8 *)0x104ffff7 ; mem_slct[5] = (uint_8 *)0x105ffffa ; mem_slct[6] = (uint_8 *)0x100ffffc ; mem_slct[7] = (uint_8 *)0x107ffffe ;   for(num_chips = 0;num_chips < 8; num_chips ++ ) {  mem_pointer = mem_slct[num_chips];   select_ram_page(mem_pointer);  old_memory[num_chips] = *mem_pointer;  mem_pointer++;  test_data = *mem_pointer;  mem_pointer --;  *mem_pointer =0x55;  test_data = *mem_pointer;  *mem_pointer = old_memory[num_chips];    if( test_data != 0x55 )   break;   }   select_ram_page(0);   return (num_chips); }

 I used global variables so that I could view the results in the IDE.

I had to actually use the mem_pointer so that it wouldn't be optimized out of use.

 

During our first production run of a 52259 based product we ran into defects where address and data lines were disconnected. Sometimes a defect of this nature can go undetected if the memory location affected isn't reached.

I now need to come up with a full memory test (not just a few locations) that will be able to indicate when a defect is discovered.

I will post my code when finished but I am open to suggestions.

 

Thanks

Labels (1)
0 Kudos
Reply
2 Replies

505 Views
kef
Specialist I
0 Kudos
Reply

505 Views
boogy
Contributor III

Good morning and thanks for the info. I have bookmarked this site for future reference.:smileywink:

0 Kudos
Reply