Re: C Program to test ROM
- From: Thad Smith <ThadSmith@xxxxxxx>
- Date: Thu, 31 Mar 2005 13:47:36 -0700
"R.Satish" wrote:
>
> hi, i need C program to check :EEPROM(BIOS on
> PC),RAM(SD/DDR),Keyboard,UART and report they ok or not
Assuming you are running in a processor mode with access to all the
devices, a EEPROM can be checked to nominally work (write a byte and
read back) or you can do a more comprehensive test to write every
byte, which I would normally not do if it was the BIOS chip. Side
issue: why would BIOS be in EEPROM? If you want to verify fixed data
without testing the write capability, you probably should use a CRC
calculation on the memory.
RAMs are usually tested by writing specific test patterns and reading
back to verify. Different patterns are good for testing different
failure modes. Make sure that you test for address decoding errors,
in which an address bit might be stuck high or low, mapping two
different addresses to the same memory location. There should be
several sources of RAM test on the web.
A keyboard and UART cannot be fully tested without having something on
the other end.
A keyboard would need to have every key pressed to fully test. To
determine whether a keyboard is simply connected, you can send it a
command and examine the response. See google for keyboard
communication if you are using a PC-compatible keyboard.
For a UART you can write and read back registers. Some have a
built-in digital loopback mode that lets you test many of the internal
features. For further checking you can use an external loopback, or,
better yet, an active device to read and write the serial data and
control lines.
The method used depends on how thorough of a test you need. Get a
data sheet for the UART you want to test.
Note: these are tests that are not easy to do running under an
operating system with memory protection, except at the system level.
Thad
.
- References:
- C Program to test ROM
- From: R.Satish
- C Program to test ROM
- Prev by Date: Algorithm to get a new unique value
- Next by Date: Re: Algorithm to get a new unique value
- Previous by thread: C Program to test ROM
- Next by thread: Re: Desktop image storing fast?! How to do
- Index(es):
Relevant Pages
|