My setup is:
-Blue Pill stm32f103c8
-arduino mega as usb to serial converter (it works Ok to flash an arduino pro mini)
-Arduino IDE 1.8.4
-downloaded the last zip from https://github.com/rogerclarkmelbourne/Arduino_STM32 and added to arduino/hardware directory
-tried with the stm3dflash that came in the zip(0.4) and downloaded the 0.5 version from sourceforge
-Windows 7 64bits
I am getting this error:
Failed to init device.
Using Parser : Raw BINARY
Interface serial_w32: 19200 8E1
I tried changing the baud rate on the .bat file tried 57600, 9600, 115200, 19200, no success.
Am I missing something?
Do you have an FTDI usb dongle you could use instead?
I don’t know how to check if it does support parity, in device manager driver config for it I can choose parity to be none, even, odd… should I change it somewhere in the arduino folder?
Does STM32flash has an option for it?
When I send it trough the terminal program using 8 bits word, the signal on the scope looks different than what stm32flash sends.
I also so in some posts here in the forum that some people have version 0.9 of the stm32flash, is that only available for non windows system?
does version 0.4 and 0.5 have bugs?
My ST-link and ftdi adapter should be here in 1 or 2 weeks, lets see if I can make it work with one of this…
I buy (avr) Arduino or stm32 Arduino boards to use avr or stm32 boards. Much more robust.
If so, did you upload in the Mega a small sketch that turn Mega TX pin as an input ?
If not, you have 2 TXs (the one from Mega and the one from STM) fighting each other …
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)
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.
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