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.
http://wiki.stm32duino.com/index.php?ti … 103_boards
Best, E.
http://wiki.stm32duino.com/index.php?ti … 103_boards
Best, E.
If unlucky with all above attempts, chances are that your board/mcu (or CP2102) is defective..
If unlucky with all above attempts, chances are that your board/mcu (or CP2102) is defective..
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.
If unlucky with all above attempts, chances are that your board/mcu (or CP2102) is defective..
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
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.
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.
If unlucky with all above attempts, chances are that your board/mcu (or CP2102) is defective..
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
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.
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
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
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
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.
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
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.
if i could route 2A to each individual usb output i would.
good cables also help as well.
srp
