Stm32f103c8t6 does not work! – It does not read, it does not record, it is not identified.

dmd
Mon Mar 27, 2017 9:55 pm
Hi guys.

I bought my first stm32f103c8t6 from China and went to test.

I used a CP2102.
I connected the RX on PA9 and TX on PA10.
GND on GND from stm32 and power went through USB.

I downloaded the libraries and everything else I needed.
I updated my Arduino IDE, changed BOOT0 to 1, and tried to burn.

I tried changing the RX / TX ports, tried changing the BOOTs, tried everything.
Always press RESET on the board.

Unable to, I tried to put the bootloader.
In github I downloaded generic_boot20_pc13.bin and followed the procedures.

Nothing worked.

I downloaded the GUI Demonstrator from the STM itself and it can not identify any device.

I tested several connection speeds (9600, 57600, 115200) and the error was always the same (using stm32flash).


C:\…\Stm32flash.exe -v -w generic_boot20_pc13.bin COM11
Stm32flash 0.4

Http://stm32flash.googlecode.com/

Using Parser: Raw BINARY
Serial_w32 interface: 57600 8E1
Failed to init device.

I tried so hard that I got lost.
Can someone help me?

Forgot a step?
Are there any alternatives?

I look forward to suggestions.

Thank you.


ahull
Mon Mar 27, 2017 11:56 pm
Is the board in question one of the ones shown on the page linked below, if so which one?
http://wiki.stm32duino.com/index.php?ti … 103_boards

stevestrong
Tue Mar 28, 2017 8:57 am
Have you set BOOT1 to “1” when programming the bootloader?

edogaldo
Tue Mar 28, 2017 11:18 am
Maybe this could help: http://www.stm32duino.com/viewtopic.php?t=747#p8336

Best, E.


dmd
Tue Mar 28, 2017 1:44 pm
ahull wrote:Is the board in question one of the ones shown on the page linked below, if so which one?
http://wiki.stm32duino.com/index.php?ti … 103_boards

dmd
Tue Mar 28, 2017 1:46 pm
stevestrong wrote:Have you set BOOT1 to “1” when programming the bootloader?

dmd
Tue Mar 28, 2017 2:01 pm
edogaldo wrote:Maybe this could help: http://www.stm32duino.com/viewtopic.php?t=747#p8336

Best, E.


edogaldo
Tue Mar 28, 2017 2:35 pm
You sure you properly installed the CP2102 drivers and selected the related COM port?
If unlucky with all above attempts, chances are that your board/mcu (or CP2102) is defective..

dmd
Tue Mar 28, 2017 2:58 pm
edogaldo wrote:You sure you properly installed the CP2102 drivers and selected the related COM port?
If unlucky with all above attempts, chances are that your board/mcu (or CP2102) is defective..

stevestrong
Tue Mar 28, 2017 3:08 pm
OK, so you have a generic C8 board (blue pill), right?
Do you have a link where you have bought the board?

Set BOOT1 to “0” (jumper in original position) and BOOT0 to “1” (jumper in the other than original position). Don’t change this configuration!
Now connect GND/PA9/PA10 to GND/Tx/Rx of the CP2101 board, supply power to USB (or press reset) and try to upload.
Does the LED light up?
If not, check the 3.3V supply voltage, maybe the on-board regulator is defective. Or maybe the USB connection lines are not soldered correctly, so that no 5V is present on the voltage regulator, it happens often.

Use the stm32flash utility from the Arduino_STM32 repository!
If it does not work, also check again with changed Rx/Tx.


edogaldo
Tue Mar 28, 2017 3:57 pm
dmd wrote:edogaldo wrote:You sure you properly installed the CP2102 drivers and selected the related COM port?
If unlucky with all above attempts, chances are that your board/mcu (or CP2102) is defective..

ahull
Tue Mar 28, 2017 10:26 pm
Also carefully examine the soldering on both the USB connector and the STM32F103XX package with a magnifier. Look out for solder splashes and poor soldering. I have had to touch up the soldering on a number of these cheap STM32 boars. There is a reason that they are cheap. Quality control is pretty minimal. :roll:

ag123
Wed Mar 29, 2017 6:40 am
imho try to boot up the board and see if it is identically wired (including leds and buttons) as a ‘maple clone’ and has the *maple bootloader pre-installed* as those ‘maple clones’

if it is a ‘maple clone’, try pressing reset and the ‘user’ led should blink 6 times in quick succession (dfu mode), it also ‘proofs’ that the maple boot loader is pre-installed and is working properly

in addition, when you hookup to usb, you should see 1eaf:0003 or 1eaf:0004, in the windows device manager
http://www.stm32duino.com/viewtopic.php … =10#p25542
in linux lsusb would show the same thing

if all these are true it may be possible to install sketch via dfu and dfu-util provided the driver stacks are properly installed (windows)
dfu-util mainly just works in *linux* and it also can be used extract pre-installed images/sketch from the soc

my thoughts are that start with a board that *works* e.g. is a ‘maple clone’ and has the *maple bootloader* preinstalled
this could help in some ways e.g. troubleshooting by comparison / elimination,
a board that works vs one that doesn’t and could localise the issue to whether if it is after all a defective uart etc

on e-bay, a ‘maple mini’ board i bought comes pre-installed with the ‘maple bootloader’, i’d suggest you could ask the seller to try to find out if that’s indeed the case. i’ve a rather pricier board from olimex https://www.olimex.com/Products/Duino/S … e-hardware
that comes with the boot loader pre-installed, but you may want to ask them to be assured if you are buying

before ‘flashing’ the board and replacing the boot loader, normally i’d try to find out if there is a way to extract the boot loader image e.g. dfu or otherwise as a backup so that it can be reinstalled if things go wrong


ag123
Wed Mar 29, 2017 6:52 am
sketch install via dfu is actually 1 of the cool things with maple / stm32 style boards, no uart dongle, no patching of uart wires to pins, just take that usb cable and flash :lol:

Pito
Wed Mar 29, 2017 8:15 am
If you were keen on the 32duino I would recommend you:
1. always buy 2 cheap boards (I do from a different sellers)
2. do invest another $2 and do purchase the ST-Link programmer clone
3. double check your wiring and the soldering quality as ahull suggests you
4. do the measurements – the only way how to succeed in the area of Electrical Engineering is you start to measure voltages, currents, signals,.. etc.

dmd
Wed Mar 29, 2017 3:09 pm
stevestrong wrote:OK, so you have a generic C8 board (blue pill), right?
Do you have a link where you have bought the board?

Set BOOT1 to “0” (jumper in original position) and BOOT0 to “1” (jumper in the other than original position). Don’t change this configuration!
Now connect GND/PA9/PA10 to GND/Tx/Rx of the CP2101 board, supply power to USB (or press reset) and try to upload.
Does the LED light up?
If not, check the 3.3V supply voltage, maybe the on-board regulator is defective. Or maybe the USB connection lines are not soldered correctly, so that no 5V is present on the voltage regulator, it happens often.

Use the stm32flash utility from the Arduino_STM32 repository!
If it does not work, also check again with changed Rx/Tx.


dmd
Wed Mar 29, 2017 3:14 pm
edogaldo wrote:dmd wrote:edogaldo wrote:You sure you properly installed the CP2102 drivers and selected the related COM port?
If unlucky with all above attempts, chances are that your board/mcu (or CP2102) is defective..

dmd
Wed Mar 29, 2017 3:45 pm
ahull wrote:Also carefully examine the soldering on both the USB connector and the STM32F103XX package with a magnifier. Look out for solder splashes and poor soldering. I have had to touch up the soldering on a number of these cheap STM32 boars. There is a reason that they are cheap. Quality control is pretty minimal. :roll:

dmd
Wed Mar 29, 2017 4:05 pm
ag123 wrote:imho try to boot up the board and see if it is identically wired (including leds and buttons) as a ‘maple clone’ and has the *maple bootloader pre-installed* as those ‘maple clones’

if it is a ‘maple clone’, try pressing reset and the ‘user’ led should blink 6 times in quick succession (dfu mode), it also ‘proofs’ that the maple boot loader is pre-installed and is working properly

in addition, when you hookup to usb, you should see 1eaf:0003 or 1eaf:0004, in the windows device manager
http://www.stm32duino.com/viewtopic.php … =10#p25542
in linux lsusb would show the same thing

if all these are true it may be possible to install sketch via dfu and dfu-util provided the driver stacks are properly installed (windows)
dfu-util mainly just works in *linux* and it also can be used extract pre-installed images/sketch from the soc

my thoughts are that start with a board that *works* e.g. is a ‘maple clone’ and has the *maple bootloader* preinstalled
this could help in some ways e.g. troubleshooting by comparison / elimination,
a board that works vs one that doesn’t and could localise the issue to whether if it is after all a defective uart etc

on e-bay, a ‘maple mini’ board i bought comes pre-installed with the ‘maple bootloader’, i’d suggest you could ask the seller to try to find out if that’s indeed the case. i’ve a rather pricier board from olimex https://www.olimex.com/Products/Duino/S … e-hardware
that comes with the boot loader pre-installed, but you may want to ask them to be assured if you are buying

before ‘flashing’ the board and replacing the boot loader, normally i’d try to find out if there is a way to extract the boot loader image e.g. dfu or otherwise as a backup so that it can be reinstalled if things go wrong


dmd
Wed Mar 29, 2017 4:18 pm
Pito wrote:If you were keen on the 32duino I would recommend you:
1. always buy 2 cheap boards (I do from a different sellers)
2. do invest another $2 and do purchase the ST-Link programmer clone
3. double check your wiring and the soldering quality as ahull suggests you
4. do the measurements – the only way how to succeed in the area of Electrical Engineering is you start to measure voltages, currents, signals,.. etc.

edogaldo
Wed Mar 29, 2017 4:44 pm
dmd wrote:
Incidentally, the VID and PID appearing me are these:

The USB device\VID_0000&PID_0002\7&851e25a&0&3 could not be migrated.

And…

Last Device Instance ID: USB\VID_0A5C&PID_4500\5&15c311e1&0&4


dmd
Wed Mar 29, 2017 4:57 pm
edogaldo wrote:dmd wrote:
Incidentally, the VID and PID appearing me are these:

The USB device\VID_0000&PID_0002\7&851e25a&0&3 could not be migrated.

And…

Last Device Instance ID: USB\VID_0A5C&PID_4500\5&15c311e1&0&4


ag123
Wed Mar 29, 2017 10:15 pm
hi dmd,

normally when a device is plugged into usb, the computer, usb host controller initiates a ‘procedure’ called enumeration, hence u get those windows response.
and on the device (i.e. stm32f103c8t6), the thing that did that enumeration response is non other than the app installed on the soc e.g. the ‘boot loader’ or any app for that matter. (i.e. there is an app in the stm32f103c8t6, however you mentioned reset did not blink the leds, possibly it isn’t the ‘de-facto maple boot loader’, but some other app
http://www.atmel.com/Images/doc4290.pdf

i did a google search for USB\VID_0000&PID_0002, as normally this is not a valid VID/PID
came up with some results e.g.
http://www.microchip.com/forums/m792449.aspx
Yeah, usually a VID or PID = 0x0000 means a hardware issue. Or a “deep” problem in firmware.
http://www.techsupportforum.com/forums/ … 63162.html
2 or 3 of the motherboards USB ports have went bad and was making the rest mess up when being used. Haven’t had any issues with it for some time now. I’m going to mark this as solved.


i’ve had some troubles flashing arduino ‘sketch’ in the past to my stm32f103rbt6 as well, it turns out in my case i’ve a poor / bad / faulty usb cable.
i’ve been using an ‘unshielded/unbraided’ usb cable, i remove that and changed to a better ‘shielded / briaded’ usb cable and thereafter hardly have much issues

you may want to get a better ‘shielded / briaded’ usb cable if you suspect that it could be a cable fault that’s causing the problems.
just 2 cents


ag123
Thu Mar 30, 2017 6:36 am
the classic leaflabs maple reset or rather ‘perpetual bootloader mode’ (provided the maple or stm32duino bootloader is preinstalled) :lol:
https://youtu.be/rvNIeKuXsxM
https://youtu.be/bxmfN-boHZ8

http://docs.leaflabs.com/static.leaflab … oader-mode
Perpetual Bootloader Mode

In this mode, Maple stays a DFU device and does not jump to user code until the next reset. This is useful for guaranteeing that your Maple will be available for reprogramming.

To put your Maple (or other Maple board) into perpetual bootloader mode:

Plug your board into the USB port.
Hit the reset button (it’s the button labeled RESET). Notice that your board blinks quickly 6 times, then blinks slowly a few more times.
Hit reset again, and this time push and hold the other button during the 6 fast blinks (the normal button is labeled BUT). You can release it once the slow blinks start.


dmd
Thu Mar 30, 2017 6:14 pm
ag123 wrote:hi dmd,

normally when a device is plugged into usb, the computer, usb host controller initiates a ‘procedure’ called enumeration, hence u get those windows response.
and on the device (i.e. stm32f103c8t6), the thing that did that enumeration response is non other than the app installed on the soc e.g. the ‘boot loader’ or any app for that matter. (i.e. there is an app in the stm32f103c8t6, however you mentioned reset did not blink the leds, possibly it isn’t the ‘de-facto maple boot loader’, but some other app
http://www.atmel.com/Images/doc4290.pdf

i did a google search for USB\VID_0000&PID_0002, as normally this is not a valid VID/PID
came up with some results e.g.
http://www.microchip.com/forums/m792449.aspx
Yeah, usually a VID or PID = 0x0000 means a hardware issue. Or a “deep” problem in firmware.
http://www.techsupportforum.com/forums/ … 63162.html
2 or 3 of the motherboards USB ports have went bad and was making the rest mess up when being used. Haven’t had any issues with it for some time now. I’m going to mark this as solved.


i’ve had some troubles flashing arduino ‘sketch’ in the past to my stm32f103rbt6 as well, it turns out in my case i’ve a poor / bad / faulty usb cable.
i’ve been using an ‘unshielded/unbraided’ usb cable, i remove that and changed to a better ‘shielded / briaded’ usb cable and thereafter hardly have much issues

you may want to get a better ‘shielded / briaded’ usb cable if you suspect that it could be a cable fault that’s causing the problems.
just 2 cents


zmemw16
Sat Apr 01, 2017 3:40 am
usb 2 and usb3 – i’ve had both prove difficult and very, very frustrating.
i use a couple of bash scripts watching lsusb and /dev for items of interest /dev/ttyUSBn /dev/ttyACMn stlink etc

i’ve come to believe that the supply rail to the hub is critical, a ‘decent’ 5v psu capable of 4 Amps seems to work. :D
if i could route 2A to each individual usb output i would.
good cables also help as well.
srp


Leave a Reply

Your email address will not be published. Required fields are marked *