Go Down

Topic: STM32F103C Upload error using Arduino IDE (Read 237 times) previous topic - next topic

janosandi

hello Guys

i have used the Circuit Digest guide of uploading sketch to ST32F103 But it says cant intialize the device

also on arduino another error msg appears


no protocol:"http://dan.drown.org/stm32duino/package_stm32duino_index.json"

any help please



pert

i have used the Circuit Digest guide of uploading sketch to ST32F103 But it says cant intialize the device
Please do this:
  • (In the Arduino IDE) File > Preferences
  • Uncheck the checkbox next to "Show verbose output during: compilation"
  • Check the checkbox next to "Show verbose output during: upload
  • Click "OK"
  • Sketch > Upload
  • After the upload fails, you'll see a button on the right side of the orange bar "Copy error messages" (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button.
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
  • Press "Ctrl + V". This will paste the upload output between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.




no protocol:"http://dan.drown.org/stm32duino/package_stm32duino_index.json"
It's because of the quotes. Open File > Preferences and then remove the quotes from the URL in the "Additional Boards Manager URLs" field.

BJHenry

#2
Jun 10, 2019, 04:10 pm Last Edit: Jun 10, 2019, 04:13 pm by BJHenry
When you get the initialisation error are you trying to upload via the onboard USB or through a USB-Serial adapter?
If you're trying to use the onboard USB, have you uploaded the Arduino-compatible bootloader?

janosandi

Code: [Select]
Sketch uses 12648 bytes (19%) of program storage space. Maximum is 65536 bytes.
Global variables use 2456 bytes (11%) of dynamic memory, leaving 18024 bytes for local variables. Maximum is 20480 bytes.
C:\Users\janos\AppData\Local\Arduino15\packages\stm32duino\tools\stm32tools\2019.3.31/win/serial_upload.bat COM8 {upload.altID} {upload.usbID} C:\Users\janos\AppData\Local\Temp\arduino_build_881071/Blink.ino.bin
Failed to init device.
stm32flash 0.4

http://stm32flash.googlecode.com/

Using Parser : Raw BINARY
Interface serial_w32: 115200 8E1


hello again
thanks for reply guys

im using usb to serial to upload the sketch & i ha ve tersted it on arduino uno & it works & yes the quotes was the reason of the no protocol msg

i have tried to set the serial speed to 115200 from device mnger but the sme error

any ideas please

BJHenry


janosandi

yes & i have pressed the reset button & the preloaded Blink program stopped bliniking

BJHenry

Interesting. I'm doing the same thing you are- using an external USB-Serial to program an STM32F103C8, and that error is what I see if I haven't put it into bootloader mode.
Can you show us your circuit schematic? It might also be a good idea to post this over at STM32duino, since those folks are likely to have a better idea.

janosandi

#7
Jun 11, 2019, 01:51 pm Last Edit: Jun 11, 2019, 01:53 pm by janosandi
im using prolific USB to TTL converter connecting the 5v & GND to 5v & GND of Blue Pill Board & the Tx & Rx to A9 A10 of it(i have tried even to revers this pins) & when i run the board the Led blinks & when i change the jumper of boot to 1 & press the reset button the led stop blinking But when it tries to upload the compiled code i get that error

i will post this at STM32duino also

any help will be great

Thanks   

janosandi

im using prolific USB to TTL converter connecting the 5v & GND to 5v & GND of Blue Pill Board & the Tx & Rx to A9 A10 of it(i have tried even to revers this pins) & when i run the board the Led blinks & when i change the jumper of boot to 1 & press the reset button the led stop blinking But when it tries to upload the compiled code i get that error

i will post this at STM32duino also

any help will be great

Thanks   
i was confused of the 5v or 3.3v
even on STM32duino its not so clear

(Ensure that the serial adapter is using 3.3 Volt (or else, that the Tx/Tx pins of the target device are 5 Volt tolerant).)

what you think ?

BJHenry

im using prolific USB to TTL converter connecting the 5v & GND to 5v & GND of Blue Pill Board & the Tx & Rx to A9 A10 of it (snip)
A9 (TX) goes to RX on the USB-Serial
A10 (RX) goes to TX on the USB-Serial


i was confused of the 5v or 3.3v
even on STM32duino its not so clear

(Ensure that the serial adapter is using 3.3 Volt (or else, that the Tx/Tx pins of the target device are 5 Volt tolerant).)

what you think ?
The nice thing about the STM32F103 is that it has plenty of 5V tolerant pins. This includes TX1 and RX1, so it doesn't matter if your USB-Serial adapter is 5V. The only thing to be careful of is the supply voltage of the USB-Serial adapter- if it is 5V then connect it to the 5V pin on the Bluepill, if it is 3.3V then connect to the 3.3V pin of the Bluepill.

janosandi

But its the same i couldnt do it again
i have read the instructions again on STM32duino but & i have noticed that after connecting the usb to serial converter connect the usb with everything connected but still have the same error on Arduino IDE

any suggestion again ?
Can it be already damaged for some reason ?

is the baud rate of the serial converter matters?

thanks for help

Johnny

BJHenry

any suggestion again ?
Can it be already damaged for some reason ?
That's always possible, but since the blink example is working I wouldn't expect so.

is the baud rate of the serial converter matters?
Do you mean the baud rate that is set in the sketch? No, that doesn't matter when you're uploading.

janosandi

That's always possible, but since the blink example is working I wouldn't expect so.
Do you mean the baud rate that is set in the sketch? No, that doesn't matter when you're uploading.
so what do you suggest ?
i have already tested the USB Serial Converter on Arduino UNO

if you did the same method of programming would you plz send me the instruction again to make sure im not doing any mistake?


BJHenry

Just so we're on the same page, how did you check that your USB-Serial adapter was working correctly?

This is how I upload using an external USB-Serial adapter-
1) Connect GND of the USB-Serial to GND of the Bluepill. Connect USB-Serial 5V to 5V on Bluepill OR 3.3V to 3.3V.
2) Connect TX of USB-Serial to PA10 of Bluepill.
3) Connect RX of USB-Serial to PA9 of Bluepill.
4) Make sure that BOOT0 is pulled HIGH and BOOT1 is pulled LOW.
5) Select the correct Board and Variant in the TOOLS menu.
6) Select 'Serial' as the Upload Method in the TOOLS menu.
7) Select the correct serial port in the TOOLS menu.
8) Hit 'Upload'.

janosandi

Just so we're on the same page, how did you check that your USB-Serial adapter was working correctly?

This is how I upload using an external USB-Serial adapter-
1) Connect GND of the USB-Serial to GND of the Bluepill. Connect USB-Serial 5V to 5V on Bluepill OR 3.3V to 3.3V.
2) Connect TX of USB-Serial to PA10 of Bluepill.
3) Connect RX of USB-Serial to PA9 of Bluepill.
4) Make sure that BOOT0 is pulled HIGH and BOOT1 is pulled LOW.
5) Select the correct Board and Variant in the TOOLS menu.
6) Select 'Serial' as the Upload Method in the TOOLS menu.
7) Select the correct serial port in the TOOLS menu.
8) Hit 'Upload'.
i have did the same exactly & about the USB to Serial converter I have tested it by programming Atmega 328 on Arduino uno board while pressing the reset button & its programmed successfuly

Go Up