Self-test in binary mode

Posted on Friday, October 16th, 2009 in binmode, Bus Pirate by Ian


See the latest version in the documentation wiki.

Since v2 the Bus Pirate firmware has included a self-test that verifies the function of pins and peripherals. The latest v2.6-nightly build adds a self-test to the binary bitbang mode. This is a useful way for applications to test the Bus Pirate, and for manufacturing quality control.

Self-test details after the break. Don’t forget that we’re giving Bus Pirate probe cables to script authors.

Self-test commands

  • 00010000 – Short self-test
  • 00010001 – Long test (requires jumpers between +5 and Vpu, +3.3 and ADC)

Self-tests are access from the binary bitbang mode. There are actually two self-tests available. The full test is the same as self-test in the user terminal, it requires jumpers between two sets of pins in order to test some features. The short test eliminates the six checks that require jumpers.

After the test is complete, the Bus Pirate responds with the number of errors. It also echoes any input plus the number of errors. The MODE LED blinks if the test was successful, or remains solid if there were errors. Exit the self-test by sending 0xff, the Bus Pirate will respond 0x01 and return to binary bitbang mode.

There’s a simple Perl self-test example in our scripts folder.  Specify the Bus Pirate serial port with -p, and choose a full test (-tf) or a short test (-ts). Run the script without options for a help page.

This entry was posted on Friday, October 16th, 2009 at 7:54 am and is filed under binmode, Bus Pirate. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a Reply

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

Recent Comments

  • KH: Using an alkaline coin cell down to 1.0V or under is a very bad idea anyway, unless you as the designer or manufacturer don't care...
  • KH: Farnell says TS1001 is no longer stocked. Not on RS. Digikey says it's obsolete. That said, there are a lot of nanoamp-class parts on sale...
  • Peter: Sunday--
  • Chris Brightly: Best of luck to all, including the wayward prototypers yet to post!
  • Wolfi: o/