Goals
The goal is to build an easy to use, low-cost test platform for the
LM4F120/TM4C123 LaunchPad. Automated self-diagnostic software can
give frustrated students and experimenters some insight as to whether
errors are due to broken I/O ports on the microcontroller or bugs in their
software.
What it Does
With the Tester Booster Pack installed, test software downloaded to the
LaunchPad, and a computer terminal attached, an automated diagnostic can
quickly report possible problems with I/O pins.
This
combination of software and hardware tests that each digital pin can
function as a GPIO digital input and output, and it verifies that the
analog inputs can measure an analog voltage. The tester works regardless of
whether the R1, R2, R9, R10, R11, R12 and R13 user-configurable jumpers are
installed or removed. However, on the TM4C123 the pin PB1 is connected to
+5V via R29 (zero ohms), so R29 should be removed for testing a TM4C123
LaunchPad with this tester.
Warning: Make sure R25 and R29 are not present on the
TM4C123 LaunchPad. If R25 and/or R29 are present, either remove them or do
not use this tester.
The
goal is not to test whether the LM4F120/TM4C123 chip coming from the Texas
Instruments silicon fab is fully functional. Rather, it assumes the fault
is caused by use/misuse of the LaunchPad by the
experimenter-explorer. Therefore, this tester does not evaluate the
alternate functions, because it is assumed that the most common fault
caused by the experimenter-explorer will be damaged input or output
transistors inside the LM4F120/TM4C123 but connected directly to the pin.
Similarly, the tester does not evaluate the LM4F120/TM4C123 pins that are
not mapped out to the Booster Pack headers.
What Problem it Solves
A
student presents an LM4F120/TM4C123 LaunchPad board and claims that it does
not work. Teaching assistants need a quick and easy way to determine
if the problem is due to hardware or software. Experience has
indicated that experimentation and faulty prototype circuit assembly can
damage the microcontroller's digital and analog GPIO pins. It is
frustrating to try to debug software when the problem is actually caused by
a broken microcontroller pin.
In
addition, students who wish to buy or sell a microcontroller at the end of
the semester might want a quick and easy way to verify that it is working
properly.
Hint: If you are not going to use MSP430 Booster Packs,
we recommend you remove the R9 and R10 resistors. R9 is a zero ohm resistor
connecting PB6 to PD0. Similarly, R10 is a zero ohm resistor connecting PB7
to PD1.
How it Works
The
Stellaris LaunchPad Tester Booster Pack connects the pins of each Port A-E
together with 10k resistors. Port F pins are connected with 220 ohm
resistors. It is an extremely simple circuit with minimal hardware
costs. A non-zero resistance value prevents damage to the
microcontroller when more than one pin is set as an output, since little or
no current flows. An LED is connected across two pins, which will be
+3.3V and ground if the Booster Pack is installed backwards. No two
pins are connected together by less than 440 ohms of resistance regardless
of any way the Booster Pack may be incorrectly connected.
Hint: When plugging the Booster Pack onto the LaunchPad
the letters on the booster should orient the same way as letters on the
LaunchPad.
To
test each digital GPIO pin, the software running on the Stellaris LaunchPad
configures one pin on each GPIO port as an output and the rest of the pins
on the GPIO port as inputs. It attempts to make each output high and
low and checks that each input responds accordingly. Experience has
indicated that GPIO pins can be broken in several ways: stuck high, stuck
low, or broken input. The software attempts to check each case.
When a measurement does not match expectation, an error message is printed
through the UART to a computer running a terminal. Advanced pattern
matching is left up to the operator. There may be cases where
multiple pins are broken on a port (such as PA2 being
stuck high and PA3 being stuck low or multiple input pins being broken or
intermittent) such that the remainder of the test is meaningless. A
voltmeter may still be needed in these cases, but the typical student can
interpret this automated diagnostic as basically, “buy a new board”, “don’t
use Port A, or “don’t using Port E bit 4.”
To
test each analog ADC pin, the software configures all other pins on the
associated port as digital outputs, and of course the ADC pin is an analog
input. For example, since AIN10 is on PB4, the rest of Port B is set
as digital outputs. Then one by one, each functional digital output
(PB0, then PB1, etc) is set high and the ADC pin
is sampled repeatedly. For example, the first pass will set PB0 high,
PB4 analog in, and the six other pins of Port B set low, so PB4 will see
about 1/7 of +3.3V. The second pass will set PB0 and PB1 high, and
the five other outputs of Port B set low, so PB4 will see about 2/7 of
+3.3V. It is expected that the ADC measurement increases with each
pass. Again, a certain amount of pattern recognition is left to the
operator in the event of very damaged Stellaris
boards. If some or all of the GPIO pins on a port fail the digital
test, they will not be able to accurately test the analog pins on the same
port. But since the analog and digital are electronically separated
on the Stellaris, it is possible that one may be broken and the other still
works. This automated diagnostic strives to be the best possible
without using a function generator and oscilloscope, but again the best
interpretation of multiple errors might be, “use the analog inputs on a
different port.”
The
computer terminal is not strictly necessary. This can be a useful
feature for teaching assistants tasked with testing hundreds of (usually
undamaged) Stellaris LaunchPad boards. They can skip the terminal
steps and simply use the multi-colored LED built into the Stellaris
LaunchPad for a quick test. The steps for a quick test are: 1) plug in the
booster; 2) attach the USB cable; 3) download the tester software; and 4)
hit reset. If the LaunchPad passes all tests, the green light flashes.
Project Features
• Automated test of GPIO pins
• Automated test of ADC pins
• Descriptive terminal output
• Test points to facilitate debugging
• Automatically detects if Booster Pack is plugged in upside down
• Low cost, $65 in quantity 1
• Easy to use
|