cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to Programm Blue pill

super_EEG
Associate II

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?

14 REPLIES 14

Boot into the bootloader by holding BOOT0 high during reset.

I don't really see anything wrong with what you're showing in the opening post.

> 13:11:57 : RUNNING Program ...
> 13:11:57 : Address: : 0x08000000
> 13:11:57 : Start operation achieved successfully

After these lines, your program is now running, not the bootloader, so it won't be responding to bootloader commands. Perhaps STM32CubeProgrammer shouldn't be sending commands at this point, but the error messages you see are expected if the bootloader is no longer running.

If you feel a post has answered your question, please click "Accept as Solution".

I am Building a Greaseweazle:https://github.com/tebl/Amiga-DrawBridge 

And the PCB requires a Blue Pill.

I thought there was something wrong because I uploaded a blinky program that is suppost to Blink PC13 on the Blue Pill and the LED didn't Blink.

But the description also said that if the LED doesn't blink, your Blue Pill Board is Probably fake, so maybe my Blue Pill is fake:https://github.com/keirf/Greaseweazle/wiki/STM32-Fakes 

Yeah maybe, or the code is bad, or it's failing during startup or something else.

This is why an SWD connection is needed--to facilitate debugging situations like this. Otherwise you spend more time guessing than programming.

Also, yes, probably a cloned chip. May or may not be the issue here.

If you feel a post has answered your question, please click "Accept as Solution".

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.