Black STM32F103 board from aliexpress with different pcb layout

Generic boards that are not Maple or Maple mini clones, and don't contain the additional USB reset hardware
User avatar
juliusbangert
Posts: 10
Joined: Tue Aug 01, 2017 4:02 pm

Black STM32F103 board from aliexpress with different pcb layout

Post by juliusbangert » Wed Aug 02, 2017 11:04 am

I recently ordered and received this generic STM32 development board from aliexpress...

Image

It has a different layout from the ones that are commonly used in the tutorials I've been trying to follow. I cannot for the life of me get it to upload from the Arduino IDE. I have followed the instructions from this site and have tired various different things. These are the settings I'm trying :

Board : "Generic STM32F103 Series"
Varient : "STM32F103C8 20k RAM. 64k Flash"
CPU Speed(MHz) : "72Mhz (Norma)"
Upload Method : "Serial"
Optimize : "Smallest (Default)"
Port : "/dev/cu.wchusbserial640"
Programmer : "AVRISP mkll"

The jumper pins are in a different place on this board but I'm just assuming the arrangement of the pins for program mode is the same as the others because when I set the jumpers and reset the default blink that came on the board stops.

I am using this USB to Serial with the following connections ...

RXD > A9
TXD > A10
VC > 3V ( on the four pins at the end of the STM32 board )
GND > G ( on the four pins at the end of the STM32 board )

Image

I'm using Arduino 1.8.3 and I get the following error in the Arduino IDE console

Code: Select all

Failed to init device.
stm32flash Arduino_STM32_0.9
http://github.com/rogerclarkmelbourne/arduino_stm32
Using Parser : Raw BINARY
Interface serial_posix: 230400 8E1
Can anyone please please help me?

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

Re: Black STM32F103 board from aliexpress with different pcb layout

Post by mrburnette » Wed Aug 02, 2017 11:48 am

juliusbangert wrote:
Wed Aug 02, 2017 11:04 am
I recently ordered and received this generic STM32 development board from aliexpress...
<...>
Can anyone please please help me?
Maybe: http://wiki.stm32duino.com/index.php?title=Black_Pill

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

Re: Black STM32F103 board from aliexpress with different pcb layout

Post by mrburnette » Wed Aug 02, 2017 11:51 am

Last edited by mrburnette on Wed Aug 02, 2017 11:52 am, edited 1 time in total.

stevestrong
Posts: 1747
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Black STM32F103 board from aliexpress with different pcb layout

Post by stevestrong » Wed Aug 02, 2017 12:00 pm

Try lowering the serial Baudrate, 230kBaud is too high, I think 56k should work.

User avatar
juliusbangert
Posts: 10
Joined: Tue Aug 01, 2017 4:02 pm

Re: Black STM32F103 board from aliexpress with different pcb layout

Post by juliusbangert » Wed Aug 02, 2017 2:00 pm

Thank you. This is the one... I just didn't know what to search for but I'm really pleased there is some documentation on this board.

I'm now trying to burn the bootloader but the instructions are for windows and linux. Any suggestions for doing this on a mac?

User avatar
Pito
Posts: 1593
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Black STM32F103 board from aliexpress with different pcb layout

Post by Pito » Wed Aug 02, 2017 2:20 pm

While watching the schematics they put a diode between USB_5V and RT9193 input, such they decreased the RT's input voltage to 4.3V.
A good move.
PS: there is none "5V" output pin.
Pukao Hats Cleaning Services Ltd.

User avatar
juliusbangert
Posts: 10
Joined: Tue Aug 01, 2017 4:02 pm

Re: Black STM32F103 board from aliexpress with different pcb layout

Post by juliusbangert » Wed Aug 02, 2017 2:41 pm

So how would I go about burning the bootloader with a mac?

User avatar
juliusbangert
Posts: 10
Joined: Tue Aug 01, 2017 4:02 pm

Re: Black STM32F103 board from aliexpress with different pcb layout

Post by juliusbangert » Wed Aug 02, 2017 3:47 pm

I downloaded the black pill bootloader binary and then from my mac terminal I have tried running the following :

Code: Select all

cd ~/Documents/Arduino/hardware/Arduino_STM32/tools/macosx/stm32flash 

./stm32flash -w ~/Downloads/generic_boot20_pb12.bin -v -g 0x0 /dev/cu.wchusbserial410
... and I get the following error

Code: Select all

stm32flash Arduino_STM32_0.9

http://github.com/rogerclarkmelbourne/arduino_stm32

Using Parser : Raw BINARY
Interface serial_posix: 57600 8E1
Failed to init device.
I don't know what I'm doing or what that error means, I'm kind of guessing what to do on a mac from things written in on this page.
Can someone please help me.

fredbox
Posts: 95
Joined: Tue Jul 07, 2015 4:44 pm

Re: Black STM32F103 board from aliexpress with different pcb layout

Post by fredbox » Wed Aug 02, 2017 4:12 pm

You may need a different USB serial adapter. My CH340 board was getting similar errors, but the CP2102 I have found and flashed it the first time.
Make sure Boot0=1 and Boot1=0 before you try to upload the bootloader. There was/is an issue with some serial drivers not supporting parity.

The Black Pill is the board I use for nearly all my projects as it has mounting holes that make it easy to mount in an enclosure.

User avatar
juliusbangert
Posts: 10
Joined: Tue Aug 01, 2017 4:02 pm

Re: Black STM32F103 board from aliexpress with different pcb layout

Post by juliusbangert » Wed Aug 02, 2017 4:33 pm

fredbox wrote:
Wed Aug 02, 2017 4:12 pm
You may need a different USB serial adapter.
Thanks fredbox, I don't have another USB Serial here right now but I'll order one, but I don't reckon that's the problem because it works just fine with the pro mini.

So After doing a whole load of pip and python serial install crap; I finally got some kind of response from my terminal window from running the bootloader install...

Code: Select all

stm32flash Arduino_STM32_0.9

http://github.com/rogerclarkmelbourne/arduino_stm32

Using Parser : Raw BINARY
Interface serial_posix: 57600 8E1
Version      : 0x22
Option 1     : 0x00
Option 2     : 0x00
Device ID    : 0x0410 (Medium-density)
- RAM        : 20KiB  (512b reserved by bootloader)
- Flash      : 128KiB (sector size: 4x1024)
- Option RAM : 16b
- System RAM : 2KiB
Write to memory
Erasing memory
Wrote and verified address 0x080052a4 (100.00%) Done.

Starting execution at address 0x08000000... done.
Looks good yea?

Well I still can't upload a bloody blink sketch from Arduino IDE. Any ideas?

Post Reply