I have a STM32F401 board and I was able to flash a keyboard firmware successfully via USB DFU by pressing boot0 and pressing/releasing reset buttons available on the board itself. The keyboard firmware works correctly, as show by the dmesg logs below:
[ +7.330366] usb 1-8: new full-speed USB device number 6 using xhci_hcd
[ +0.246888] usb 1-8: New USB device found, idVendor=4454, idProduct=5444, bcdDevice= 0.01
[ +0.000010] usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ +0.000004] usb 1-8: Product: "Pill60"
[ +0.000003] usb 1-8: Manufacturer: "IktaS"
[ +0.021417] input: "IktaS" "Pill60" Keyboard as /devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-8/1-8:1.0/0003:4454:5444.0007/input/input23
[ +0.055386] input: "IktaS" "Pill60" Mouse as /devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-8/1-8:1.0/0003:4454:5444.0007/input/input24
[ +0.000162] hid-generic 0003:4454:5444.0007: input,hidraw4: USB HID v1.11 Keyboard ["IktaS" "Pill60"] on usb-0000:01:00.0-8/input0
[ +0.006643] hid-generic 0003:4454:5444.0008: hiddev97,hidraw5: USB HID v1.11 Device ["IktaS" "Pill60"] on usb-0000:01:00.0-8/input1
The problem now is that I get errors when entering USB DFU mode. These are the dmesg logs after doing the same procedure stated above to enter DFU mode:
[Sep13 19:06] usb 1-8: USB disconnect, device number 6
[ +0.746053] usb 1-8: new full-speed USB device number 7 using xhci_hcd
[ +0.150048] usb 1-8: device descriptor read/64, error -71
[ +0.230024] usb 1-8: device descriptor read/64, error -71
[ +0.229910] usb 1-8: new full-speed USB device number 8 using xhci_hcd
[ +0.150118] usb 1-8: device descriptor read/64, error -71
[ +0.229960] usb 1-8: device descriptor read/64, error -71
[ +0.106683] usb usb1-port8: attempt power cycle
[ +0.403098] usb 1-8: new full-speed USB device number 9 using xhci_hcd
[ +0.026832] usb 1-8: Device not responding to setup address.
[ +0.233785] usb 1-8: Device not responding to setup address.
[ +0.206127] usb 1-8: device not accepting address 9, error -71
[ +0.123325] usb 1-8: new full-speed USB device number 10 using xhci_hcd
[ +0.026920] usb 1-8: Device not responding to setup address.
[ +0.233615] usb 1-8: Device not responding to setup address.
[ +0.206103] usb 1-8: device not accepting address 10, error -71
[ +0.000156] usb usb1-port8: unable to enumerate USB device
The same messages happen when I plug the board while pressing the boot0 button. Plugging the board this way skips the previously installed firmware and directly goes to the erroneous state.
My understanding is that this board has a bootloader in the ROM that cannot be replaced or modified, so I don't think the flashing of the firmware could have interfered with the bootloader.
Has anyone experienced this problem? Is it possible to fix it?