I’ve started working with STM32 less than a week and now I have a problem. I read many topics but I did not find right solution.
I have bought a custom board and this board does not have a bootloader. unfortunately, I do not know how to use with stm32loader.exe

So, I tried to find another way and I found a solotion http://www.scienceprog.com/flashing-pro … ootloader/
I’ve downloaded Flash Loader Demonstrator software and connected PL2303 USB to serial converter to the board.(BOOT1=0; BOOT0=1)

Now the software can’t communicate with board.

How can I solve this problem. I am grateful that you help me.
This is because there are many USB-TTL which use clone chips, and the official drivers on Windows prevent them to work properly.
On Linux, this is not an issue, the drivers are working properly.
With FTDI chips, it is even worse, if you have ever heard about their “bricking” driver.


In the mean time, you can maybe try with the stm32flash tool, there is a Windows version in Arduino_STM32/tools/win/stm32flash.exe
It should work, as all USB to serial I have tried including the PL and CP ones work fine
PS.
Post a link to the board on the suppliers website and also a schematic if possible
It should work, as all USB to serial I have tried including the PL and CP ones work fine
PS.
Post a link to the board on the suppliers website and also a schematic if possible
Both the pacific and the sil labs boards work fine for me under W7 prof
Both the pacific and the sil labs boards work fine for me under W7 prof
Mine are Prolific not “Pacific”
http://prolificusa.com/pl-2303hx-drivers/
I tend to stay away from FTDI as its impossible to tell if they are real or fake, i.e even the expensive ones may be fake so there is no point taking the risk of FTDI bricking them for you
Unfortunately, this board does not have a switch for Boot1 and I set it manually 0 with 10K resistor. Is there the possibility that the chip is broken?
schematic of board:

Connectivity:
You must pull Boot1 LOW (but I see you have done this with a 10k resistor
Try Boot0 switch in both positions
Failing that, its best to buy a cheap STLink programmer tool
E.g. Like this
http://www.ebay.com/itm/Mini-ST-Link-V2 … SwstxVOgsj
I don’t know if they ship to Iran, but I’m sure you can find a vendor who will send to you
BTW. Also sometimes, with the STM Flash Loader, I have to press Reset several times before it works e.g.
press 2 or 3 times, the try connecting with the STMFlash Loader program
Here is the aliexpress link page for them: http://tinyurl.com/hok2v34
BTW: the schematic is’nt readable, much too small.
BTW: the schematic is’nt readable, much too small.

Finally I did it, Roger was right.
I changed Boot0 switch in another position and pressed reset button, Finally worked.(I had done it before on another port but it did not work


Upload generic_boot20_pc13.bin via Flash Loader Demonstrator:
Upload Blink Sketch:

Congratulations, BrotherV and happy coding now!

About the schematic: I just wanna be sure, that there are two 22R resistors on USB because this would have taken to the next troubles this was my complain about the unreadable schematic (I feel a little bit offended, if it is assumend that I cannot get a stinky ST-Link v2 schematic



Hi @BrotherV
I am not sure if you are now using the bootloader of if you are still loading via usb to serial
I you upload the bootloader, you should then be able to connect the PC directly to the USB on the STM32,
However it looks like the board has reset hardware like the Maple mini, so the bootloader you need to use is probably the maple mini version
But i cant read the circuit as it is too blurred
can you tell us which GPIO pin is connected to the 2 transistors which are in the top left of the diagram?
Perhaps its PB1??
But the Maple Mini uses PB9.
I think someone added another Maple mini variant bootloader with using a different pin ( to do the USB reset), but I cant remember which pin that was.
So I may need to add a new bootloader variant to support this board if it uses PB1
stephen
stephen
But I just checked and there isnt a version which uses PD2 to cause the USB to re-enumerate
Its fairly easy for me to recompile a new version, but I’m afraid It can’t do it today, as its 21:25 local time, and I’ve just finished work.
i.e I”ve been working for 12 hours as I have a deadline for tomorrow morning
So its too late for me to make you a new bootloader today
Perhaps some other kind person can add you a new build target or perhaps you can make a new target and rebuild it
I try my best, I read many topics but how do I change the bootloader for this board?

I mean, how do I define the usb reset pin in config.h and how to make a new bin file?!!!!
Thanks
#elif defined TARGET_ECA
#define HAS_MAPLE_HARDWARE 1
#define LED_BANK GPIOC
#define LED_PIN 13
#define LED_ON_STATE 0
/* USB Disc Pin Setup. USB DISC is PD2 */
#define USB_DISC_BANK GPIOD
#define USB_DISC 2
#elif defined TARGET_ECA
#define HAS_MAPLE_HARDWARE 1
#define LED_BANK GPIOC
#define LED_PIN 13
#define LED_ON_STATE 0
/* USB Disc Pin Setup. USB DISC is PD2 */
#define USB_DISC_BANK GPIOD
#define USB_DISC 2
I was going to do it at the weekend
One thing to note is that the board will not automatically reset prior to upload
You will need a new board Variant in order to do that.
Probably your best bet is to copy the Maple RET6 folder and change lines 102 and 103 in board/board.h
/* USB configuration. BOARD_USB_DISC_DEV is the GPIO port containing
* the USB_DISC pin, and BOARD_USB_DISC_BIT is that pin's bit. */
#define BOARD_USB_DISC_DEV GPIOC
#define BOARD_USB_DISC_BIT 12
Still some questions remaining. I’ll ask after the weekend.
I’ve uploaded bootloader via Demonstrator GUI, but pc13 is not blinking and pc doesn’t recognize stm32 board when I plug in the usb cable.
(I’ve installed maple dfu drivers and changed lines 102 and 103 in board/board.h)
Have a nice weekend
I will try loading the @fredbox firmware onto a “redpill” board that has an led on pc13
I had missed editing one line in the makefile, so it was not copying the right binary.
Please try again. PC13 on the blue pill here is blinking away.