Bus Pirate: Self-test guide

in Bus Pirate by Ian | 0 comments

BPv3v2go-pinout

See the latest version on the documentation wiki.

In the past few days Hack a Day’s Bus Pirate preorders have started to arrive all over the world. Broken units have been extremely rare, there’s only been one manufacturing defect and one broken FTDI chip reported so far. Seeed Studio tested the bootloader and terminal of each Bus Pirate, but problems can always occur in transit.

Firmware v2.0 has a self-test routine that will help determine if your Bus Pirate v2go has a defect. Upgrade to the latest Bus Pirate firmware before attempting the self-test. Bus Pirate v3 will come with a power-on self-test mode.

Detailed self-test instructions and analysis follow the break.

Performing the self-test

BPv3v2go-pinout

  1. Disconnect any devices from the Bus Pirate I/O header pins. An external device will interfere with the test, and could be damaged by the voltages used (+5volts) on some pins.
  2. Make the self-test connections shown in the figure above. Connect the Vpullup (Vpu) pin to the +5V pin. Connect the ADC pin to the +3.3V pin.
  3. To begin the self test, type ‘~’ followed by enter in the terminal. Self-test is available in HiZ mode only.
  4. You will be reminded to make the self-test connections and remove any external devices. Press any key to run the self-test.

Here’s the output from a self-test:

HiZ>~ <<< self-test command
Disconnect any devices.
Connect the Vpu pin to the +5V pin.
Connect the ADC pin to the +3.3V pin.
These results are experimental.
Press any key to continue. <<< follow the instructions to begin
Starting test.
Control pin test…
AUX PIN OK
MODE LED PIN OK
PULLUP PIN H OK
PULLUP PIN L OK
VREG PIN OK
Analog pin and power supply test…
5V(5.0) OK
VPULLUP(5.0) OK
3.3V(3.3) OK
ADC(3.3) OK
Bus pins, normal, high…
MOSI PIN OK
CLK PIN OK
MISO PIN OK
CS PIN OK
Bus pins, open collector, low…
MOSI PIN OK
CLK PIN OK
MISO PIN OK
CS PIN OK
Bus pins, open collector, high…
MOSI PIN OK
CLK PIN OK
MISO PIN OK
CS PIN OK
HiZ>

This Bus Pirate passed the self-test with no problems.

What does it do?

The self-test verifies that components connected to the PIC24FJ64GA002 respond as expected.

The self-test enables the auxiliary (AUX) pin, MODE LED, and voltage regulator control (VREG), and verifies that each pin went high. The CD4066 control pin (PULLUP) is held at 5volts with a pull-up resistor, so we test it high to see if the pull-up is working, and then low to see if the PIC pin is operating correctly.

  • If pull-up high fails, check R19.
  • Other errors could be a soldering defect or broken microcontroller.

The four analog voltage monitors and the two power supplies are tested. The 3.3volt and 5volt supplies are enabled and checked for the correct voltage. The ADC and Vpullup pin monitors are connected to the power supplies in order to test their function, as well as verify the results of the power supply monitors.

  • If 5volt and Vpullup (or 3.3volts and ADC) both read 0volts, there could be a problem with the voltage regulator. Check VR3, VR4, C22, C24, R18.
  • If one shows a voltage, but the other doesn’t, there could be a problem with the voltage monitor, the PIC microcontroller, or you forgot to connect the pins for self-test mode. Check R10-R16.

The bus I/O pins and pull-up resistors are tested three ways. First, all bus pins are set high and verified without pull-up resistors. The pins then go low and the pull-up resistors are enabled to test open drain pin functionality. Finally, the pins are put in high-impedance mode to test the on-board pull-up resistors.

  • Open collector high failures could indicate a problem with the on-board pull-up resistors, or you forgot to connect the 5volt and Vpullup pins. Check R19, R20-R23, IC3.
  • Other errors could be a soldering defect or broken microcontroller.

If your Bus Pirate fails the self-test…

  • Make sure that no device is connected to any of the pins
  • Ensure that the +5v pin is connected to the Vpullup pin
  • Check that the +3.3v pin is connected to ADC pin
  • Check for poor solder connections or solder bridges
  • Post the results of your test in our unofficial Bus Pirate forum
This entry was posted in Bus Pirate and tagged , .

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.