Bus Pirate: v3 power-on self-test


Seeed Studio tested the bootloader and terminal of each Bus Pirate prior to shipping. This is a good test, but Seeed requested that we design a more thorough test program for future orders.

We implemented a self-test menu option in firmware version 2 that tests most of the hardware and functions on the Bus Pirate PCB. It’s still a slow way to test 1000 units, so we came up with a power-on self-test for v3 hardware that can be semi-automated.

The manufacturer’s power-on self-test (POST) is activated by connecting the inner programming pin (which will be PGD on v3 hardware) to +3.3volts (the power pin). This creates a PGD/PGC mismatch that exits the bootloader, and then the main firmware runs the POST if the pin is high.

The POST is a silent version of the self-test available from the Bus Pirate terminal (menu ‘~’). If the test is successful, the MODE LED lights. This could be confused with the v2 ‘bootloader ready LED’, but you can see the VREG LED blink during POST. When the test is complete, any data sent to the Bus Pirate over the USB connection is echoed back, which tests the FTDI chip and the PIC UART. If there were errors, the number of errors is added to the value returned. The easiest test is to enter ASCII 0 and the number of errors will be returned.

The POST is a little dangerous because there’s a chance of accidentally entering the POST mode and harming an attached circuit. v3 will probably ship with a jumper between the inner programming pin and ground, just to guard against accidental POSTs. The v3 article will include a table of ICSP jumper settings with corresponding modes, like ‘normal’, ‘bootloader’, and ‘POST’.

Leave a comment

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

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