[PDF] Schematic STM32F103C8T6 Dev Board
Ref: [PDF] Blackmagic Probe (Original) Schematic/ Board Layout
Ref: [PDF] Blackmagic Probe(Mini) Schematic
Note: Check the value of the pull-up resistor connected to PA12. Forum posts indicate problems with the USB if this is 10kOhm (R10). The recommendation is for a 1.5kOhm resistor. I measured a 4.7kOhm resistor on my board and haven't experienced any issues.
The image above shows the STM32F103C8T6 Development board plugged into a breadboard. 5V & GND connections have been established. There us a 5V to 3.3V regulator on board which is why 5V is being used. The TTL-232R-3V3 provides 5V power but uses 3.3 for signals, exactly what is needed for this setup.
All STM32 ARM chips contain a hardware bootloader allowing them to be programmed over the serial interface (USART1). I will be using a USB to Serial cable (FTDI TTL-232R-3V3) to perform my uploads.
Pin Connections for Serial Upload to target
Note: USB to Serial Converter TTL232R-3V3 (5V Power, 3.3V Signals)
|Pin1 (Black) GND||-----||GND (Various Pins)|
|Pin2 (Brown) CTS#||Not Connected|
|Pin3 (Red) VCC[5V]||-----||5V/3.3V DC/DC Converter|
|Pin4 (Orange) TXD||-----||PA10 (RX)|
|Pin5 (Yellow) RXD||-----||PA09 (TX)|
|Pin6 (Green) RTS#||Not Connected|
To enable the bootloader set the jumpers on the board accordingly (See Image Above):
BOOT0 = 1
BOOT1 = 0
Then push the reset button.
To perform the upload I will be using a Python script called stm32loader.py available on GitHub https://github.com/jsnyder/stm32loader.
A slightly newer/modified version that does the same thing can be found at
Flashing a bootloader
I had found a page at http://leaflabs.com/docs/bootloader.html but this seems to be offline for some reason. An older version of the page can be found through the archive.org.The guide references/referenced a maple board to which a bootloader would be uploaded to allow flashing via the Arduino environment. The guide itself was applicable to loading up any program via the serial interface. It looks like I might have to come back to this and write it up in a little more detail.
Uploading a test program
I found a simple blinking LED test that was compatible with my hardware to have a go at uploading.
So now all I have to do is to test the upload.
- Plug in USB/Serial Converter and attach board
- Jumper BOOT0 = 1
- Jumper BOOT1 = 0
- Reset Board
$ ./stm32loader.py -ew generic-boot20_pc13.bin
On completion of upload
- Jumper BOOT0 = 0
- Reset Board
LED on PC13 should now be flashing.
Download the raw file from GitHub and attempt the upload again.
$ ./stm32loader.py -e
$ ./stm32loader.py -r 8192 test
$ less text
Time to pause at this point. The program we have uploaded should have been a maple bootloader for use with the Arduino environment. The issue with it at the time of writing is that it fails to enumerate as a usable port when connected to my machine. I am not overly concerned as I wasn't planning on continuing to use this method but it does halt proceedings a little. We have the hardware and a method of uploading a program to it (via Serial). The one thing that is not yet possible is to compile program for upload.
Back to Index