Categories

Self-test in binary mode

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

perl-st

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

  • coppice: If all you have found so far is fake iphones, the next place you should visit is SEG in Hua Qiang Bei. Get out of...
  • Edward Cooper: Great article and good find on the markets! Any chance you can provide the locations of these places? I'm in Shenzhen at the moment and...
  • Dan: I'm up for one
  • TrickyNekro: Always in for another bunch! :-D
  • mol-1: Maybe this time !