uploading error in stm32f103 blue pill

Post here first, or if you can't find a relevant section!
Post Reply
hakam
Posts: 7
Joined: Fri Sep 30, 2022 2:45 pm

uploading error in stm32f103 blue pill

Post 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?
Last edited by hakam on Fri Sep 30, 2022 6:08 pm, edited 1 time in total.
ag123
Posts: 1653
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: uploading error in stm32f103 blue pill

Post 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
hakam
Posts: 7
Joined: Fri Sep 30, 2022 2:45 pm

Re: uploading error in stm32f103 blue pill

Post 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
GonzoG
Posts: 403
Joined: Wed Jan 15, 2020 11:30 am
Answers: 26
Location: Prudnik, Poland

Re: uploading error in stm32f103 blue pill

Post by GonzoG »

Check if you connected TX/RX wires correctly.
hakam
Posts: 7
Joined: Fri Sep 30, 2022 2:45 pm

Re: uploading error in stm32f103 blue pill

Post by hakam »

Yes sir, tx rx, ground connected properly
ag123
Posts: 1653
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: uploading error in stm32f103 blue pill

Post 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.
ozcar
Posts: 143
Joined: Wed Apr 29, 2020 9:07 pm
Answers: 5

Re: uploading error in stm32f103 blue pill

Post 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.
Post Reply

Return to “General discussion”