I bought one of these (version 3.6) from Seeed Studio some time ago, figuring that it would be useful someday and that I would be glad to have it on hand.
I am beginning to work with a "STM32F103C8T6 ARM STM32 Minimum System Development Board" and one approach to using the SWD port is to use a bus pirate, so away I go.
I will note right up front that after all of what follows, I abandoned this approach, purchased some inexpensive ST-Link V2 devices, and have found that they work perfectly, are easy to use, and cheap, so there is no point in all this.
My unit has an FTDI FT232RL usb to serial chip and a PIC24FJ64GA. The only other large chip is an HC4066 (this is a "quad bilateral switch" and is used as a level shifter and buffer for 4 signals: cs, clock, mosi, miso).
The PIC is a 16 bit processsor with 64K of flash and 8K of ram. It has a 16 channel 10 bit ADC, sampling up to 500K/s. The processor can run at 8 Mhz and perhaps as fast as 32 Mhz.
The outside world connector has 10 pins:
Gnd +5 Vpu Clk CS 3v3 ADC Aux Mosi MisoThere is also a row on 5 pins (unpopulated) at the bottom of the board labelled ICSP. This is for reprogramming the PIC and they say you should never need to use it.
MLCR* +3v3 Gnd Pgd Pgc
Bus Pirate v3b Firmware v5.10 (r559) Bootloader v4.4 DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8) http://dangerousprototypes.com
Amazingly, there is alternate firware to turn the Bus Pirate into a "STK500 v2 clone", which is something you may have heard of if you have fooled around with AVR controllers. Amazing, good to know about, but not the droids we are looking for at this point.
To do the firmware upgrade, you need to get the Pirate running its boot loader (the easiest way seems to be typing "$" to the pirate prompt). Then you pick your hex file and run the "pirate-loader" program. The supply compiled executables (including one for linux) as well as source code in case you need to recompile the loader. They think of everything.
./pirate-loader_lnx --dev=/dev/ttyUSB1 --hex=BPv3-frimware-v6.1.hexNote the misspelling of "frimware", that is really the name of the file ....
So, I get brave and do it. First I run picocom to type the "$" and get the boot loader going (I have to answer a "are you sure" question). Then I exit picocom and type the command above. There is lots of reassuring chatter about pages being erased and written, then it tells me that the installation was successful. I disconnect/reconnect the USB cable, and fire up picocom and it tells me:
Bus Pirate v3.5 Firmware v6.1 r1676 Bootloader v4.4 DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8)This seems to have worked!
The colors refer to the wire in the cable, ignore the color of the probe/clip. Also note that the colors (as in all ribbon cables) follow the resistor color code.
The SWD port is a 4 pin header with:
Gnd Dclk Dio 3.3
Tom's Computer Info / tom@mmto.org