Page 2 of 2

Re: Blue Pill - Error trying to program

Posted: Thu Sep 07, 2017 1:04 am
by RogerClark
Can you explain how you are using your Arduino Mega as a USB to Serial converter ?

Are you taking the pins (I think D0 and D1) to the STM32 PA9 and PA10
(I'm not sure if D0 goes to PA9 or PA10 as I can't recall which is which on the Mega etc)

Re: Blue Pill - Error trying to program

Posted: Thu Sep 07, 2017 8:31 am
by csnol
I think you should use ST Flash Loader Demonstrator to upload the STM32F103-PC13.bin bootloader first.
Image

Re: Blue Pill - Error trying to program

Posted: Thu Sep 07, 2017 8:39 am
by csnol
If still error, maybe some wrong on PA9/PA10 of your BP. or use USB-TTL or STLINK try again.

Re: Blue Pill - Error trying to program

Posted: Sat Sep 09, 2017 12:46 am
by FreD
Arduino mega2560 has an 8u2 micro running as usb2serial converter.
I kept the mega2560 IC on reset. and use pins 0 and 1 of arduino as TX and RX, it is marked the other way around on the pcb, because it says what is this pin for the mega and not the 8u2. It works fine to flash the arduino pro mini, also works as loop back.

I am not sure if the 5v on the serial makes any difference for the stm but I found on the datasheet it is 5v tolerant.

I am really curious to understand what my mistake is.

Re: Blue Pill - Error trying to program

Posted: Sat Sep 09, 2017 1:17 am
by RogerClark
Which PC software are you using.

STM's own "Flash Loader Demonstrator" is the most reliable

I think I managed to get it to upload to using a UNO as a USB to Serial converter by running the Multi software serial example sketch

However it would only work at one baud rate (which I think was the fairly slow, e.g. somewhere in the 30k - 60k range)

I think parity can be a problem with the Arduino Uno etc,- it was definitely a problem when I tried using the Multi software serial , but it could be software serial which was the issue in that case