Page 1 of 1

uploading error in stm32f103 blue pill

Posted: Fri Sep 30, 2022 5:40 pm
by hakam
hii all plz guide, i am facing problem in uploading code in stm32f103c8t6 after compilation ,

error comes:

Sketch uses 23324 bytes (35%) of program storage space. Maximum is 65536 bytes.
Global variables use 3572 bytes (17%) of dynamic memory, leaving 16908 bytes for local variables. Maximum is 20480 bytes.

-------------------------------------------------------------------

STM32CubeProgrammer v2.11.0

-------------------------------------------------------------------
Serial Port COM3 is successfully opened.
Port configuration: parity = even, baudrate = 115200, data-bit = 8,

stop-bit = 1.0, flow-control = off
Activating device: OK
Board : --
Chip ID: 0x410
Response received from device: NACK
Error: GET command not acknowledged!
Reemission of Get command





plz guide,now should i change my stm32 board?

Re: uploading error in stm32f103 blue pill

Posted: Fri Sep 30, 2022 5:50 pm
by ag123
for stm32f103c8 ('blue pill') you need a st-link v2 or a usb-uart dongle (you need to set boot0) for it.
otherwise, use stm32f401ccu ('black pill') that you have? - normally boot0 is a button on stm32f401ccu

Re: uploading error in stm32f103 blue pill

Posted: Fri Sep 30, 2022 6:14 pm
by hakam
yes sir ,i am using FTDI to upload the code but getting error , i want to check ADC accuracy in blue pill also .I noticed arduio328 ADC is giving highest ADC acuuracy with no noise in adc output but arduino 328 is no so much powerful because i have to do FFT transform on signal also

Re: uploading error in stm32f103 blue pill

Posted: Fri Sep 30, 2022 11:08 pm
by GonzoG
Check if you connected TX/RX wires correctly.

Re: uploading error in stm32f103 blue pill

Posted: Sat Oct 01, 2022 1:57 am
by hakam
Yes sir, tx rx, ground connected properly

Re: uploading error in stm32f103 blue pill

Posted: Sat Oct 01, 2022 6:14 am
by ag123
there are quire a few tutorials floating on the web these days
https://circuitdigest.com/microcontroll ... g-usb-port
https://paramaggarwal.medium.com/progra ... 3cec0dbc86
https://www.electrosoftcloud.com/en/stm ... ogramming/

to use a usb-uart for programming stm32f103 a key thing is to set boot0.
some dongles and utilities can 'abuse' the dtr/rts signals to toggle boot0 and reset
e.g. https://github.com/jsnyder/stm32loader

it is usually considered a 'hassle' these days, the usual thing is to install a boot loader on stm32f103 and after that use it.

to save the trouble use a stm32f4xx e.g. stm32f401cc, the DFU boot loader is built-in on all stm32f4xx, all you need is to set/press boot0 and toggle reset for flashing.

Re: uploading error in stm32f103 blue pill

Posted: Sat Oct 01, 2022 9:10 pm
by ozcar
I don't normally use the F103 "system memory" serial bootloader for programming, but in response to a recent thread here I did try it. I ran into two problems, as mentioned in that thread.

First problem was that it turned out that the USB-TTL serial converter I tried to use was locked to "8N1", while the serial bootloader needs "8E1".

Then when I changed to using another USB-TTL converter, I found one of my Blue Pill boards would still not program. That problem was due to bad soldering on the board, the processor boot0 pin was totally disconnected, so it was never getting into bootloader mode. That is not the only bad soldering I have had on such boards - another one had some pins on the processor shorted.

Probably a long shot that either of those could be what is causing your problem, but maybe worth checking. It might be useful to see if the GUI STM32CubeProgrammer can connect.