Menu

#140 stm32f411ce LIBUSB_ERROR_PIPE while writing firmware

none
needsinfo
nobody
None
2023-03-28
2022-06-10
v.21
No

When I try

dfu-util.exe -d 0483:df11 -a "@Internal Flash  /0x08000000/04*016Kg,01*064Kg,03*128Kg" --dfuse-address 0x08000000 -D adafruit-circuitpython-stm32f411ce_blackpill-en_US-7.3.0.bin

I get

dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Warning: Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 0483:df11
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(10) = dfuERROR, status(10) = Device's firmware is corrupt. It cannot return to run-time (non-DFU) operations
Clearing status
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash  "
Downloading element to address = 0x08000000, size = 475340
Erase           [=========================] 100%       475340 bytes
Erase    done.
Download        [===                      ]  13%        63488 bytesdfuse_download: libusb_control_transfer returned -9 (LIBUSB_ERROR_PIPE)
Error during download

The percentage at which it fails varies, I saw for example 2%, 12%, 13%.
With .bin files of completely different firmware, it fails at other percentages, for example 0% or 8%.
It sometimes also fails at 0% of erasure. For small .bin files more often than for large ones.
I tried several different cables (several USB C and a USB Micro-B with an adaptor to USB C), but to no avail.
I also tried dfu-util version 0.7. Same problem there:

Downloading to address = 0x08000000, size = 475340
.................................dfuse_download: libusb_control_transfer returned -9
Error during download
Failed to write whole chunk: -9 of 2048 bytes

How can this be fixed? Thank you!

Discussion

  • Tormod Volden

    Tormod Volden - 2022-06-10

    Please follow the instructions on https://sourceforge.net/p/dfu-util/tickets/new/

     
  • Tormod Volden

    Tormod Volden - 2022-09-07
    • summary: LIBUSB_ERROR_PIPE while writing firmware --> stm32f411ce LIBUSB_ERROR_PIPE while writing firmware
     
  • Anonymous

    Anonymous - 2022-10-29

    The same problem. I patch quirks.h, quirks.c to add "quirks |= QUIRK_POLLTIMEOUT" for my vendor and product ID. My version 0.11+ saved at https://github.com/azorg/dfu-util

     
    • Tormod Volden

      Tormod Volden - 2023-03-13

      Please if you upload the source to github or anywhere else, upload the whole git history with your changes on top. In other words, pull the official git tree, make your changes, and push to wherever.

       
  • Tormod Volden

    Tormod Volden - 2023-03-13
    • status: open --> needsinfo
     
  • Tormod Volden

    Tormod Volden - 2023-03-13

    Still waiting for complete information.

     
  • Anonymous

    Anonymous - 2023-03-28

    I don't quite know if this is related, but I'm getting the same error on an upload (to my linux machine). The chip is from the same series, but I don't know the exact name.

     

Anonymous
Anonymous

Add attachments
Cancel