Daniel J. Valvano

Stellaris LaunchPad Tester



            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

Hardware Requirements

1) LM4F120/TM4C123 LaunchPad
2) Tester Booster Pack

Software Requirements

1) Keil uVision 4 (free code-limited version is OK) https://www.keil.com/demo/eval/arm.htm
2) Tester Software Project (Download all hardware and software files)
3) A Terminal application
• Hyper Terminal will work for Windows XP or older
• PuTTY http://www.chiark.greenend.org.uk/~sgtatham/putty/
4) PCB Artist if you wish to edit the PCB http://www.4pcb.com/


Bill of Materials BOM.xls - Itemized list of components and part numbers needed

PCB Layout Tester.pcb (PCB Artist file) - Top.pdf - Bottom.pdf - Tester.fab The physical layout of the printed circuit board

TesterSchematicDesign.pdf  Schematic Tester.sch (PCB Artist file) - The circuit schematic showing how the components are connected electrically

gerberfiles.zip  Gerber Files - Compressed file containing data in a standard format, which is needed to manufacture the printed circuit board

TesterNetList.txt - List of each electrical node and where it connects


Instructions for Use

1) Download and unzip the Keil uVision 4 program code.
2) Connect the tester Booster Pack to your LM4F120/TM4C123 LaunchPad, making sure that the silkscreen text is going the same way on both boards. When the USB cable is connected to the top of the LaunchPad, the red LED should be in the bottom left corner, and the Longhorn should be right-side-up.

3) Plug the USB cable into the LM4F120/TM4C123 LaunchPad and into the computer. If the red LED on the Booster Pack comes on, the Booster Pack board is connected backwards. If this is the case, unplug the USB cable from the computer, rotate the Booster Pack board 180 degrees, and plug the USB cable back into the computer.
4) Open the Keil uVision project file named Tester.uvproj.
5) Compile and download the program to the LaunchPad.
6) Find the COM port number of your LM4F120/TM4C123 LaunchPad in Windows with the Device Manager:
Open the Control Panel and select “Hardware and Sound.

Then select “Device Manager”.

Expand “Ports (COM & LPT)” and note the COM port number of the LaunchPad.

7) Open your terminal program (for Windows 7 consider PuTTY; for Windows XP open Hyper Terminal).
8) Configure your terminal for the COM port number from Step 6, 115,200 baud rate, 8-bit word length, one stop bit, no parity bits, and no flow control.

9) Hit the reset button on the LaunchPad and observe the terminal output.

Also observe the status of the LED on the LaunchPad.
Slowly flashing green – no pin errors detected.
Rapidly flashing yellow – some pin errors detected.
Slowly flashing red – all pins show errors/Booster Pack is not attached.
Slowly flashing pinkish – Booster Pack is attached backwards (Booster Pack LED is also on).



Steps for Building Your Own Tester

Step 1. Students and teachers can order PCBs from Advanced Circuits in quantity 1 for $33 plus shipping, which comes to just over $50. All the files needed to build the board using Advanced Circuits are included in the downloaded tester program. The Tester.sch is the circuit schematic, the Tester.pcb file is the layout, and the Tester.fab file is used by Advanced Circuits to build the PCB. Tester.sch and Tester.pcb can be opened and edited using the free application PCBArtist. There are pdf versions of the TesterSchematicDesign.pdf  and PCB (Top.pdf and Bottom.pdf) files if you wish to see, but not edit, the design. To get the PCB ordered, make an account on Advanced Circuits, and upload the Tester.fab file. If you order it from PCBArtist you will get a warning that U1 is outside the board; you can ignore this warning. It should cost $33 plus shipping. If you wish to use a different PCB manufacturing process the Gerber files are included in the gerberfiles.zip file.

Step 2. You will need to collect the other materials to build the tester. These materials can be found in the BOM.xls file. Any LED is ok, and the value of R36 is selected as (3.3-Vd)/Id, where Vd, Id are the operating point of your LED. The test-points can be also be replaced by soldering a loop of wire into the test-point hole.

Step 3. Before soldering anything, physically place the parts together and visualize how the Booster Pack will be attached to the LaunchPad. When the Booster Pack is connected on the top of the LaunchPad, the Longhorn logo, LED, and test-points will be visible. It is easiest to solder the smallest components first. So, we recommend you solder the resistors first. The silk screen will show you the orientation of the resistors, half of which go on the bottom and half go on the top. Solder the test-points and LED so they are positioned on the top, which is the side with the Longhorn logo. Recheck how the SamTec connectors will be attached before soldering. Consider connecting the SamTec connectors to the LaunchPad before attaching them to the Booster Pack board to ensure that they fit together when you are finished soldering.












Last updated July 1, 2013