Arduino STM32 Blue Pill upload error - Failed to init device

The system is Fedora 30, IDE version 1.8.5

The STM32 is a Blue Pill, the loaded bootloader is from Git Hub - Roger Clark

The extension is: http://dan.drown.org/stm32duino/package_STM32duino_index.json

The Arduino_STM32-master folder is in the ~/Arduino/hardward folder. The shell script has been run to update udev.

The script compiles but fails on upload:

Arduino: 1.8.5 (Linux), Board: "Generic STM32F103C series, STM32F103C8 (20k RAM. 64k Flash), Serial, 72Mhz (Normal), Smallest (default)"

Archiving built core (caching) in: /tmp/arduino_cache_953974/core/core_Arduino_STM32-master_STM32F1_genericSTM32F103C_device_variant_STM32F103C8,upload_method_serialMethod,cpu_speed_speed_72mhz,opt_osstd_f4be0b87757460f216911882cde95804.a
Sketch uses 12612 bytes (19%) of program storage space. Maximum is 65536 bytes.
Global variables use 2496 bytes (12%) of dynamic memory, leaving 17984 bytes for local variables.
Maximum is 20480 bytes.
/home/dan/Arduino/hardware/Arduino_STM32-master/tools/linux/serial_upload ttyACM0 {upload.altID} {upload.usbID} /tmp/arduino_build_269565/Blink.ino.bin
Failed to init device.
stm32flash Arduino_STM32_0.9

Using Parser : Raw BINARY
Interface serial_posix: 115200 8E1

An error occurred while uploading the sketch


Below is dmesg output for USB device:

[183188.128391] usb 1-2: new full-speed USB device number 60 using xhci_hcd
[183188.256259] usb 1-2: New USB device found, idVendor=1eaf, idProduct=0003, bcdDevice= 2.01
[183188.256262] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[183188.256264] usb 1-2: Product: Maple 003
[183188.256265] usb 1-2: Manufacturer: LeafLabs
[183188.256266] usb 1-2: SerialNumber: LLM 003
[183189.638191] usb 1-2: USB disconnect, device number 60
[183189.889374] usb 1-2: new full-speed USB device number 61 using xhci_hcd
[183190.017653] usb 1-2: New USB device found, idVendor=1eaf, idProduct=0004, bcdDevice= 2.00
[183190.017655] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[183190.017656] usb 1-2: Product: Maple
[183190.017657] usb 1-2: Manufacturer: LeafLabs
[183190.019466] cdc_acm 1-2:1.0: ttyACM0: USB ACM device

1 Like

I was recently in the same situation as you and I may have stumbled onto something which has worked for me. I have de-soldered resistors R3 and R4 and put some solder to bridge the pads where the resistor were or try replacing them with 10K. I hope this helps you in any way.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.