Skip to main content
Associate
March 17, 2024
Solved

Unable to Programm Blue pill

  • March 17, 2024
  • 4 replies
  • 7333 views

When I try to program my Blue Pill over UART in the Stm32CubeProgrammer it give me this Error message:

13:11:23 : Serial Port ttyUSB0 is successfully opened.
13:11:23 : Port configuration: parity = even, baudrate = 115200, data-bit = 8, stop-bit = 1,0, flow-control = off
13:11:23 : Activating device: OK
13:11:23 : Board : --
13:11:23 : Chip ID: 0x410
13:11:23 : BootLoader protocol version: 3.0
13:11:23 : UPLOADING OPTION BYTES DATA ...
13:11:23 : Bank : 0x00
13:11:23 : Address : 0x1ffff800
13:11:23 : Size : 16 Bytes
13:11:23 : UPLOADING ...
13:11:23 : Size : 1024 Bytes
13:11:23 : Address : 0x8000000
13:11:23 : Read progress:
13:11:23 : Data read successfully
13:11:23 : Time elapsed during the read operation is: 00:00:00.106
13:11:54 : Memory Programming ...
13:11:54 : Opening and parsing file: blinky-test-f1-1.5.hex
13:11:54 : File : blinky-test-f1-1.5.hex
13:11:54 : Size : 12,47 KB
13:11:54 : Address : 0x08000000
13:11:54 : Erasing memory corresponding to segment 0:
13:11:54 : Erasing internal memory sectors [0 7]
13:11:54 : Erasing memory corresponding to segment 1:
13:11:54 : Erasing internal memory sectors [8 12]
13:11:54 : Download in Progress:
13:11:55 : File download complete
13:11:55 : Time elapsed during download operation: 00:00:01.549
13:11:55 : Verifying ...
13:11:55 : Read progress:
13:11:57 : Download verified successfully
13:11:57 : RUNNING Program ...
13:11:57 : Address: : 0x08000000
13:11:57 : Start operation achieved successfully
13:11:57 : Error: GETID command not acknowledged!
13:11:57 : Reemission of GetID command
13:11:57 : Error: GETID command not acknowledged!
13:11:57 : Reemission of GetID command
13:11:58 : Timeout error occured while waiting for acknowledgement.
13:11:58 : Error: GETID command not acknowledged!
13:11:59 : Timeout error occured while waiting for acknowledgement.
13:11:59 : Error: GETID command not acknowledged!
13:11:59 : Reemission of GetID command
13:12:00 : Timeout error occured while waiting for acknowledgement.
13:12:00 : Error: GETID command not acknowledged!
13:12:00 : Reemission of GetID command
13:12:01 : Timeout error occured while waiting for acknowledgement.
13:12:01 : Error: GETID command not acknowledged!
13:12:02 : Timeout error occured while waiting for acknowledgement.
13:12:02 : Error: GETID command not acknowledged!
13:12:02 : Reemission of GetID command
13:12:03 : Timeout error occured while waiting for acknowledgement.
13:12:03 : Error: GETID command not acknowledged!
13:12:03 : Reemission of GetID command
13:12:04 : Timeout error occured while waiting for acknowledgement.
13:12:04 : Error: GETID command not acknowledged!
13:12:05 : Warning: Connection to device 0x410 is lost
13:12:05 : Disconnected from device.

How do I fix this?

This topic has been closed for replies.
Best answer by super_EEG

I made my own Blink program in the Arduino IDE:


// the setup function runs once when you press reset or power the board
void setup() {
 // initialize digital pin LED_BUILTIN as an output.
 pinMode(PC13, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
 digitalWrite(PC13, HIGH); // turn the LED on (HIGH is the voltage level)
 delay(1000); // wait for a second
 digitalWrite(PC13, LOW); // turn the LED off by making the voltage LOW
 delay(1000); // wait for a second
}

And that one worked, PC13 was blinking.

I uploaded it using Arduino IDE.

I also tried exporting the binary from Arduino IDE and Uploading using Stm32Cube Programmer, that also worked.

4 replies

gbm
Principal
March 17, 2024

There is nothing to be fixed - the operation is correct.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
Uwe Bonnes
Chief
March 17, 2024

You can try stm32flash.

super_EEGAuthor
Associate
March 17, 2024

When i try stm32flash i get this error:

stm32flash 0.7

http://stm32flash.sourceforge.net/

Using Parser : Intel HEX
Location     : 0x8000000
Size         : 12904
Error probing interface "serial_posix"
Cannot handle device "/dev/ttyUSB"
Failed to open port: /dev/ttyUSB


Uwe Bonnes
Chief
March 17, 2024

You need a PC-Serial adapter  to connect between the PC and the serial lines of the bootloader. You need to provide the devicename of the adapter.

TDK
Super User
March 17, 2024

When your program is running, the UART connection isn't active. You need to boot up into the bootloader again to access the chip.

UART is not a viable debugging strategy. Get a nucleo or other board that uses an SWD connection.

"If you feel a post has answered your question, please click ""Accept as Solution""."
super_EEGAuthor
Associate
March 18, 2024

How do I boot up into the bootloader to access the chip?

My Project requires a Blue Pill.

The Blue Pill also has SWD Pins, but I don't have an ST-Link.

 

Andrew Neil
Super User
March 18, 2024

@super_EEG wrote:

I don't have an ST-Link.


Then you really should get one!

They really are invaluable in the ease of programming and debug access that they give you !

Don't tie your own hands behind your back - get an ST-Link* (or a Nucleo board).

 


@super_EEG wrote:

My Project requires a Blue Pill.


Why?

It's just a board with a chip on it; it doesn't give you anything special or magic that a Nucleo or Discovery board wouldn't have, but the Nucleo does give you very significant advantages:

  1. You can be sure of a genuine STM32;
  2. You get an ST-Link included - fully wired and ready to go.

 

* Other debug probes are available.

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Peter BENSCH
Technical Moderator
April 25, 2025

This thread relates to a so-called Blue Pill, which uses illegally cloned STM32F103. ST resources are only dedicated to supporting genuine ST products. We are not committed to ensuring that clones/fakes products work properly with the firmware we provide.

We recommend to purchase genuine products from STMicroelectronics and purchase them from known and trusted distributors.

This thread will now be locked. However, if you face difficulties while using genuine ST products, we’re here to assist you. Please feel free to start a new thread, and our team, along with community members, will be ready to help you with any issues/questions you encounter.

Thank you for your understanding.

Regards
/Peter