STM32DUINO with STM32F103C8T6 from eBay
UPDATE - 2017-02-25
I got out the old STM32 board again tonight to test out a barometric pressure sensor, and boy, have things changed since the last time I looked into this.
First awesome surprise: There is now a boards manager URL that can be used to get the STM32Duino stuff pulled directly into the Arduino environment courtesy of Dan Drown:
Add this URL to the boards manager:
http://dan.drown.org/stm32duino/package_STM32duino_index.json
A bootloader is now supported in the arduino environment that can be burned onto the chip so the onboard USB connector can be used instead of the serial pin connections.
Get the bootloader binaries from here: https://github.com/rogerclarkmelbourne/STM32duino-bootloader
The bootloader is burnable with the USB->Serial adapter. A jumper must be installed from B1 (boot 1) to ground. Then power is cycled and the script ran to download the bootloader.
~/.arduino15/packages/stm32duino/tools/stm32tools/2017.7.20/linux/stm32flash$ ./stm32flash -w ~/Downloads/generic_boot20_pc13.bin -v -g 0x0 /dev/ttyUSB0
Why _pc13? Because that is the pin the LED is connected to.
-- I HAVE NOT YET GOTTEN THE ONBOARD USB CONNECTOR TO WORK AND HAVE FALLEN BACK TO USING THE SERIAL LOADING METHOD
BELOW INFORMATION IS OBSOLETE BECAUSE OF THE ABOVE ARDUINO BOARD MANAGER/BOOTLOADER DEVELOPMENTS. WIRING IS STILL ACCURATE.
Today I learned the basics of using the Arduino IDE with the STM32F103C8T6 I bought off eBay for $2.87. The trick I needed to know was that I needed to ***press the reset button*** just a fraction of a second before downloading to the controller.
Wiring:
USB RX (YELLOW)- Controller PA9 (TX)
USB TX (ORANGE)- Controller PA10 (RX)
USB 5V (RED) - Controller 5V Line on the PCB (pin 15)
USB GND (BLACK) - Controller GND (31)
Jumpers:
Boot0 - 1
Boot1 - 0
Installed Arduino Environment: (1.6.9)
Installed the Arduino_STM32 (from Github)
Ran the install.sh script in the linux tools directory.
Rebuilt the DFU tools. They didn't work on my 32 bit machine. This wasn't necessary for the serial download anyway.
Installed the Due Board Libraries (to get the arm compiler)
Settings:
BOOT 0 Jumper must be moved back to 0 after downloading to run after resets.
VERY USEFUL LINKS:
An explanation from github on how to download code
https://github.com/rogerclarkmelbourne/Arduino_STM32/wiki/Uploading
A link to the ebay store with the board I have:
The FTDI USB-3.3V cable I used:
http://www.ftdichip.com/Support/Documents/DataSheets/Cables/DS_TTL-232R_CABLES.pdf
Roger Clark is the man! Here he shows how to use the exact same board I have and explains which pins
are needed and the ALL IMPORTANT RESET BUTTON PRESS!
http://www.rogerclark.net/stm32f103-and-maple-maple-mini-with-arduino-1-5-x-ide/