Arduino for programming STM32f103c8t6 board

Generic boards that are not Maple or Maple mini clones, and don't contain the additional USB reset hardware
zmemw16
Posts: 986
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: Arduino for programming STM32f103c8t6 board

Postby zmemw16 » Sun Dec 06, 2015 2:31 pm

all my dual voltage serial interface modules have the link in the 3v3 position with the 5v pin bent away.
not snipped off as i might one day have a need.

stephen

User avatar
RogerClark
Posts: 5467
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Arduino for programming STM32f103c8t6 board

Postby RogerClark » Sun Dec 06, 2015 7:24 pm

bianchifan wrote:
armleo wrote:1.I found that i can use ARDUINO UNO as USB to TTL by connecting RESET..


But you should have an eye on VCC..and perhaps level shifters.


Good point about the need for level shifters.

From what i recall the UART pins are not supposed to be 5v tollerant, but i think I connected them to an Arduino Uno and got away without blowing them up.

There would only need to be a voltage divider into the RX pin on the STM32, and I suspect the tricknof putting a 10k resistor in series with the RX pin may also work, if you dont have the correct resistors to make a full voltage divider

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

Re: Arduino for programming STM32f103c8t6 board

Postby mrburnette » Mon Dec 07, 2015 4:03 am

RogerClark wrote:<...>
There would only need to be a voltage divider into the RX pin on the STM32, and I suspect the tricknof putting a 10k resistor in series with the RX pin may also work, if you dont have the correct resistors to make a full voltage divider


See: Level Shifting Heading

Ray

darth_llamah
Posts: 89
Joined: Fri Aug 21, 2015 10:08 am

Re: Arduino for programming STM32f103c8t6 board

Postby darth_llamah » Sat Dec 19, 2015 9:39 pm

RogerClark wrote:Good point about the need for level shifters.

...or get a *duino running at 3.3V (like Seeeduino) and level shifter won't be necessary

madias
Posts: 812
Joined: Mon Apr 27, 2015 11:26 am
Location: Vienna, Austria

Re: Arduino for programming STM32f103c8t6 board

Postby madias » Sat Dec 19, 2015 11:11 pm

some words about level shifting:
got 20 of them for 6USD (so 80 channels ;) ) so I'll never think about level shifting problems anymore:
http://www.aliexpress.com/item/20pcs-lo ... 11638.html
Ok, didn't try out high speed connections like SPI, but with I2c it works like a charm.

armleo
Posts: 10
Joined: Wed Dec 02, 2015 4:37 pm

Re: Arduino for programming STM32f103c8t6 board

Postby armleo » Mon Dec 21, 2015 4:30 pm

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)

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

Re: Arduino for programming STM32f103c8t6 board

Postby mrburnette » Tue Dec 22, 2015 3:20 am

madias wrote:some words about level shifting:
got 20 of them for 6USD (so 80 channels ;) ) so I'll never think about level shifting problems anymore:
http://www.aliexpress.com/item/20pcs-lo ... 11638.html
Ok, didn't try out high speed connections like SPI, but with I2c it works like a charm.



Yep, got a handfull myself in a recent shipment on a slowboat. Just never know when one (or 2, or 3...) willcome in handy.


Ray

zmemw16
Posts: 986
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: Arduino for programming STM32f103c8t6 board

Postby zmemw16 » Tue Dec 22, 2015 1:31 pm

i found these @0.77ukp eeks i only got 4, i know why though.
as now 0.55ukp, ... ... , 8off is max with free shipping.

http://www.aliexpress.com/item/3-3V-5V-TXS0108E-8-Channel-Logic-Level-Converter-Convert-TTL-Bi-directional-Mutual-Convert/32350456568.html

they might handle spi speeds ~8MBps?

TI datasheet http://www.ti.com/lit/ds/symlink/txs0108e.pdf has

Code: Select all

                        1.8     2.5    3.3   5.0  V
Push-pull driving       40      60    60    60 Mbps
Open-drain driving        2     2   2   2   Mbps

stephen

moc
Posts: 5
Joined: Tue Dec 29, 2015 6:25 pm

Re: Arduino for programming STM32f103c8t6 board

Postby moc » Tue Dec 29, 2015 6:39 pm

Hello friends,
I have trouble getting my "blue pill" STM32 to work.
What I have done:
- I have a (working) Arduino Nano as a USB to serial adapter (with CH340G chipset):
RESET is connected to GND
RX is connected to TX (STM, PIN9) via a level shifter
TX is connected to RX (STM, PIN10) via a level shifter
Arduino GND is connected to the level shifter and then to the STM32 GND.
Boths microcontrollers are powered via USB cables. (Is this the problem)?
- I tried Arduino 1.6.3/4/5 and extracted the "Arduino_STM32_master.zip" to the .../hardware/ folder. The Cortex M3 package is installed via the IDE.
-I can upload sketches to the Arduino, the RX led flashes just the way it should and everything works. But when I try to flash to the STM32 (via Serial/COM3), it stops after compiling and tells me:
"
Failed to init device.
stm32flash 0.4

http://stm32flash.googlecode.com/

Using Parser : Raw BINARY
Interface serial_w32: 230400 8E1
"
The RX LED flashes just two times and so dim, that you can barely see it.
I know that I should buy a ST-LINK but I would like to start this project right know and don't wanna wait any longer!
Cheers for the help!

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

Re: Arduino for programming STM32f103c8t6 board

Postby mrburnette » Tue Dec 29, 2015 8:19 pm

@moc:

What I have done:
- I have a (working) Arduino Nano as a USB to serial adapter (with CH340G chipset):
RESET is connected to GND


I understand this will work on an UNO; but, I have never heard of a Nano being used in this way. Did you test if by "looping" Send to Receive and use a terminal program on PC.

You only need one (1) level-shifter, from 5V send to 3.3V Receive.
3.3V Send can go directly to 5V Receive.

But when I try to flash to the STM32 (via Serial/COM3), it stops after compiling and tells me:
"
Failed to init device.
stm32flash 0.4


So, (IF) you got a "clean" compile... all libs and core files found for STM32... then the software should be OK.

I understand you are in a hurry to play, but when you go off and create a frankenstein bundle of wires and stuff, it really is difficult for us to help you. Do a serial loopback on Nano first.


Ray


Return to “Generic STM32F103”

Who is online

Users browsing this forum: MSNbot Media and 2 guests