On 09/08/2013 05:03 PM, Rich B wrote:
> Here's a question, would it make sense to run a memory test of a 
> microprocessor, such as the 8052?
> 
> For example, on power up, write a pattern of bits to each RAM location 
> and then read back the pattern to verify that each byte of RAM is 
> working properly.  With only 256 bytes of RAM in the typical 8052, it 
> wouldn't take long to test the RAM.
> 
> Would it make sense to write such a routine in C or would it better to 
> use inline assembly?

  I'd use assembly for something like that.  One typically wants a RAM
test program to be as small as possible, for obvious reasons.

  For a high-rel system, I'd do it.

  Bear in mind, however, that effective testing of a memory subsystem
requires some knowledge of how it's implemented, to know what types of
errors it makes sense to test for.  For example, to test for
adjacent-bit errors, one needs to know what bits are *actually* adjacent
to what other bits.  It can be an interesting in-depth exercise.

> Several other questions then come to mind, such as what do you do upon a 
> failure.

  Sit and blink an LED..

> Likewise is there some way to perform a similar test on read only code 
> memory or on in system programmable flash memory?

  As another list member noted, this is usually done by storing a
checksum somewhere in the firmware load, and computing/testing it.
That's pretty effective, and very commonly done.

               -Dave

-- 
Dave McGuire, AK4HZ
New Kensington, PA

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to