Arduino for programming STM32f103c8t6 board

Generic boards that are not Maple or Maple mini clones, and don't contain the additional USB reset hardware
Posts: 7
Joined: Sun Jan 31, 2016 3:01 am

Re: Arduino for programming STM32f103c8t6 board

Postby alfstm32 » Tue Feb 02, 2016 10:52 am

If you have put the serial port at pa9 and pa10 like the same for f103C8 and f103rbct6 (maple mini one) and
put the good setting for boot0 boot1 pin you just have to reset start stm32flash and you must have the chip good detect....

Posts: 7
Joined: Thu Jan 28, 2016 7:28 pm

Re: Arduino for programming STM32f103c8t6 board

Postby jra » Tue Feb 02, 2016 10:47 pm

FYI one minor glitch I ran into starting from bare metal with Linux Mint 17.3 and a blue pill was as follows.

Install Arduino-1.6.5, Arduino_STM32, STM32duino-bootloader
Run latest tools/linux/ to setup udev, groups, etc.
Use stm32flash to burn bootloader to blue pill via serial
Connect blue pill via usb
/dev/maple shows up pointing to bus/usb/NNN/MMM because there is no serial sketch yet
dfu-util -l RUN AS ROOT shows board
Loading a sketch from IDE using bootloader via USB AS NOT ROOT USER fails

This is because /dev/bus/usb/NNN/MMM is in the plugdev group as specified by 45-maple.rules but the script only adds $USER to the dialout group, not the plugdev group. Running dfu-util -l as $USER does not show the device because of a permission problem. When I added $USER to the plugdev group, running dfu-util -l as $USER now works. Loading the sketch from IDE using bootloader now works, powercycle blue pill and /dev/maple now points to /dev/ACMnn which is in group dialout. Bottom line is check permissions and make sure $USER can access all of the necessary devices.

User avatar
Posts: 1774
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta

Re: Arduino for programming STM32f103c8t6 board

Postby mrburnette » Wed Feb 03, 2016 12:10 am

jra wrote: Bottom line is check permissions and make sure $USER can access all of the necessary devices.

Yep. I installed the Arduino package 1.0.5 first. Then 1.7.8 from .org and lastly 1.6.7 from .cc for ESP8266 and finallynthe STM32duino core. Imentioned "permissions" but the specifics will depend onthe order of installs.


Posts: 1
Joined: Sat Feb 25, 2017 5:34 pm

Re: Arduino for programming STM32f103c8t6 board

Postby creature » Sat Feb 25, 2017 5:48 pm

Hi, after reading the post, I still cannot figure out using UNO to upload to a stm32.

armleo wrote:1.I found that i can use ARDUINO UNO as USB to TTL by connecting RESET and 5V without removing ATMEL AVR CORE
2. we must connect RX to RX TX to TX not OVRWISE!

There are 2 RESET, one from UNO and one from stm32, I tried to connect both RESET together and also 5V, with ATMEL AVR CORE on UNO. But it cannot init.

armleo wrote:I programmed my stm32 using my friend's USB to Serial.
Now i see that my arduino can't be used as USB to TTL (becuase of desoldered/not soldered PULL-HIGH resistor)!
Madis my Level shifter works on freq up to 18MHZ but i have only 4 of them. (if anybody needs i can give link to AliExpress)

It seems it does not need the core on the UNO board. Isn't there pull high resistors on the RESET pins (both on UNO and stm32)? I am confused if using a UNO board could upload to stm32. Might I know the connections for programming :?:

Posts: 9
Joined: Thu Mar 02, 2017 12:32 pm

Re: Arduino for programming STM32f103c8t6 board

Postby acronis » Fri Mar 03, 2017 6:46 am

Hello. Tell me how to connect the SD CARD module (CATALEX MicroSD Adapter (v1.0) ) to the STM32f103c8t6 board. And where can I download the library and example ? ... G_1303.jpg

Posts: 9
Joined: Thu Mar 02, 2017 12:32 pm

Re: Arduino for programming STM32f103c8t6 board

Postby acronis » Tue Mar 07, 2017 2:43 pm

Thank you ! Everything works fine!

Posts: 38
Joined: Tue Aug 02, 2016 2:26 am

Re: Arduino for programming STM32f103c8t6 board

Postby keypunch » Tue Apr 04, 2017 4:22 pm

mrburnette wrote:@alfstm32:

I've gone through maybe 15 sketches today to validate my STM32 environment, USB ports, and permissions and everything is compiling and downloading correctly.

I do remember having to chmod 0755 a couple of scripts and there was one other executable, dfu-util, I think, that needed to be set to execute.

Other than the above changes, I think everything else was non-Arduino related. One of the installation scripts for Arduino (1.0.5 I think) set the serial port permissions. I use 1.0.5 for Attiny85 stuff.

Just rereading your post and I do not notice anything obvious that you missed. Double check permissions on those 2 scripts and the dfu utility.



I believe there is a bit more in temrs of issues where the Linux side of the Arduino_STM32 is concerned. I have started to work on the other fixes and while at it make some easue of use enhancements. One script is mostly done. In my opinion these all need to delivered as package when all the issues are address as they are all related in a broader sense. It is taking a bit of lapsed time as I try to juggle the STM32 projects, missing in action slowboat shipments (8 arrived 140 days after order in last 10 days), and matters outside projects. Serious technology vomits due to distribution developers not thinking messed things up last night and will remain so as result of update that caused. It amazes me how sloppy coding or release manament is all too often. What I will provide will not be sloppy and will make things much easler and diverse flexible at same time.

As FYI I have tried the STLink on two different boards. One a not so common STM32F103C8T6 in some respects. The other was a STM32F407 board. My primary interest is these not so common in some respects STM32F103C8T6 boards. I am reading about to see if others may have had similar issues that I am having. How I found this thread of discussions as I looked about the posting topics. I built the ST-Link and ST-Info code from source. Slow and forward moving progress as to be expected with things new and some having rough edges.


John L. Males
Toronto, Ontario
04 April 2017 12:22 EDT
04 April 2017 13:17 EDT Typo Correction

Return to “Generic STM32F103”

Who is online

Users browsing this forum: No registered users and 3 guests