This post describes how to upload code to a STM32 Minimum System Development Board that can be bought from Ali Express or eBay for around $4.00 US. You will be able to compile and upload a led blinking program to the board at the end of this guide. This guide is using Arduino_STM32 by Roger Clark.
You will need:
The setup steps are:
The board setup looks like this using an Adafruit 954 TTL Serial Cable.
In the Arduino IDE:
If you reset the board or unplug it, your program will not run unless you set both Boot0 and Boot1 jumpers to 0 (LOW).
The test sketch is:
void setup() {
pinMode(PC13, OUTPUT);
}
void loop() {
digitalWrite(PC13, HIGH);
delay(100);
digitalWrite(PC13, LOW);
delay(100);
}
hi i tried your method but i keep getting failed to upload..any clue?
…Chip was locked, wrote the compiled blink .bin or .hex (cant remember) using ST’s Flash Loader Demonstrator. http://www.st.com/en/development-tools/flasher-stm32.html (at the bottom)
Now its blinking. Thanks.
C:\Program Files (x86)\Arduino\hardware\Arduino_STM32/tools/win/serial_upload.bat COM11 {upload.altID} {upload.usbID} C:\Users\User\AppData\Local\Temp\arduino_build_560096/STM32F103C8_Blink.ino.bin
Got NACK from device on command 0x43
Can’t initiate chip erase!
Failed to erase memory
stm32flash 0.4
http://stm32flash.googlecode.com/
Using Parser : Raw BINARY
Interface serial_w32: 230400 8E1
Version : 0x22
Option 1 : 0x00
Option 2 : 0x00
Device ID : 0x0410 (Medium-density)
– RAM : 20KiB (512b reserved by bootloader)
– Flash : 128KiB (sector size: 4×1024)
– Option RAM : 16b
– System RAM : 2KiB
Write to memory
Erasing memory
Can u make a video?
Do ur led blinks 6 times when u press reset?
Blinks forever.