Re: POST(Power On Self Test)



You could fill in anything for <pattern>, including shifting a 1 bit through
all of the positions in each byte and making sure that it only shows up in
the right place, and then doing the same with all 1's set in each byte and
shifting a 0 bit through each bit position, too.

Paul T.

"Valter Minute" <v_a_l_t_e_r.m_i_n_u_t_e@xxxxxxxxxxxxx> wrote in message
news:Xns9B2B6C451EEFDVALTERMINUTE@xxxxxxxxxxxxxxxx
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no
spam DOT com> wrote in news:eJ5WaMBJJHA.468@xxxxxxxxxxxxxxxxxxxx:

It's pretty hardware-dependent, as I said, generally. You might
need to know how much RAM there is or actually change RAM control
registers to find out. Whipping up something to step through a
given size range of addresses and write a pattern to all the
locations, then read back through and make sure they're all
correct shouldn't take more than five minutes to write. You could
do that right after entry to your bootloader.

unsigned char *p = 0x00000000;
unsigned long i;
for ( i = 0; i < 0x10000000; i++ )
{
*(p+i) = <pattern>;
if ( *(p+i) != <pattern> )
{
// You have a RAM failure. Indicate somehow (flash an LED
or
something).
halt;
}
}


It's better to test with two patterns (0xAA,0x55 for example) to check
that each bit can change its state.
And maybe it's also better to do all the writes and after that the
reads (ensuring also that you disabled the cache).

--
Valter Minute
www.fortechembeddedlabs.it
Training, support and development for Windows CE
(the reply address of this message is invalid)


.