Page 209 - Embedded Microprocessor Systems Real World Design
P. 209
The market- or customer-specific tests are outside the scope of this book. This
chapter concentrates on the functional test side.
Before product functional testing can begin, the hardware and software must be
made to work. Integration of the software and hardware in an embedded system is
different from a completely hardware (logic) or completely software (as an appli-
cation on a PC) design in two areas: isolating problems and fixing them.
In isolating problems, it is not always clear in which half of the system the
problem lies-hardware or software. In a pure software design, the programmer
knows that hardware problems do not affect the design-they just mean that the
computer needs to be fixed before work can proceed.
This may seem obvious, but I have seen software engineers used to writing appli-
cations for a minicomputer or PC who just walked away when a problem was
thought to be in the hardware. They were used to working on software-only systems.
Hardware bugs were a job for the repair technician. In an embedded system, the
software and hardware engineers usually have to work together far enough into the
problem to determine what actually is happening. Many times a hardware problem
that seems completely mysterious will be obvious when the software engineer
tells the hardware engineer just exactly which status bit the software is having
problems with.
Fixing problems in an embedded system has differences, too. For example, some-
times the fix for a hardware problem is best implemented in software. An example
might be a mistake in the schematic that places a peripheral at the wrong address.
The board could be altered, but that requires another layout/fab cycle. It is simpler
just to change the software. The reverse also is true, although less common.
Hardware Testing
Ideally, the software will not be tried until the hardware is completely checked out.
In the real world though, that often is impractical. A decision must be made as to
how the hardware will be tested and how far the testing will go before software is
installed. In a real system in which the software controls real hardware, the hard-
ware cannot be checked without some software to exercise it. Look at the hardware
checkout list for the pool timer:
Test Processor and EPROM: Write code that just loops, toggling a port bit on
each cycle.
Test Switches: Write special software to read switch/water low connector and
echo result to Port 1. Test each switch and corresponding port bit by verifylng
that correct Port 1 bit goes active when switch is pressed.
Test Display: Write special software that displays an incrementing number on
both pairs of display digits. This requires working decimal-to-seven segment code.
190 Embedded Microproussm Systems