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?

1 ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

14 REPLIES 14
gbm
Lead III

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

Uwe Bonnes
Principal III

You can try stm32flash.

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


TDK
Guru

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".

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.

I am using a UART to Usb Adapter.

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.

 

The STM32 Cube Programmer also says that UART is Connected when I click the Connect button.


@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.