Basic Information:
Printer Model: Artillery Sidewinder X4 Plus
MCU / Printerboard: STM32F407
Host / SBC Artillery KL v1.01 (makerbase mks-pi clone?)
klippy.log (no log because it just shows that /dev/serial/...
is missing)
Describe your issue:
The X4 Plus uses a custom klipper repo, but I’ve done changes to it and flashed it to the board and the MCU successfully many times. But the last time I wanted to flash a newer version I think I messed up by flashing klipper configured with No Bootloader set in make menuconfig. Now the MCU is effectively dead. lsusb
doesn’t show the device anymore, and /dev/serial/...
doesn’t exist either. I managed to get the mcu in DFU mode by bridging BOOT0 on the board with a wire (they didn’t solder a button here…) and pressing RESET at the same time.
This is how the device shows up in dmesg
when I do this
[ 109.674081] usb 1-1: new full-speed USB device number 2 using dwc2
[ 109.883577] usb 1-1: New USB device found, idVendor=0483, idProduct=df11, bcdDevice=22.00
[ 109.883622] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 109.883646] usb 1-1: Product: STM32 BOOTLOADER
[ 109.883664] usb 1-1: Manufacturer: STMicroelectronics
[ 109.883683] usb 1-1: SerialNumber: 329A36663033
and dfu-util -l
:
Found DFU: [0483:df11] ver=2200, devnum=2, cfg=1, intf=0, path="1-1", alt=3, name="@Device Feature/0xFFFF0000/01*004 e", serial="329A36663033"
Found DFU: [0483:df11] ver=2200, devnum=2, cfg=1, intf=0, path="1-1", alt=2, name="@OTP Memory /0x1FFF7800/01*512 e,01*016 e", serial="329A36663033"
Found DFU: [0483:df11] ver=2200, devnum=2, cfg=1, intf=0, path="1-1", alt=1, name="@Option Bytes /0x1FFFC000/01*016 e", serial="329A36663033"
Found DFU: [0483:df11] ver=2200, devnum=2, cfg=1, intf=0, path="1-1", alt=0, name="@Internal Flash /0x08000000/04*016Kg,01*064Kg,01*128Kg", serial="329A36663033"
I have tried multiple different variations of flashing CanBoot/Katapult and klipper, but nothing seems to have any effect, when I reboot, the device just doesn’t show up. I’ve tried flashing only katapult, katapult and then klipper with an offset, and only flashing klipper. All with different bootloader offsets in make menuconfig. The flashing always works without errors, but after a restart it just didn’t change anything.
make menuconfig
for katapult
Katapult Configuration v0.0.1-75-g90eb71b
Micro-controller Architecture (STMicroelectronics STM32) --->
Processor model (STM32F407) --->
Build Katapult deployment application (32KiB bootloader) --->
Clock Reference (8 MHz crystal) --->
Communication interface (USB (on PA11/PA12)) --->
Application start offset (32KiB offset) --->
USB ids --->
() GPIO pins to set on bootloader entry
[ ] Support bootloader entry on rapid double click of reset button
[ ] Enable bootloader entry on button (or gpio) state
[ ] Enable Status LED
make menuconfig
settings for klipper:
Klipper Firmware Configuration
[ ] Enable extra low-level configuration options
Micro-controller Architecture (STMicroelectronics STM32) --->
Processor model (STM32F407) --->
Bootloader offset (32KiB bootloader) --->
Communication interface (USB (on PA11/PA12)) --->
Example output of a flash:
sudo dfu-util -a 0 -D ./out/klipper.bin --dfuse-address 0x08000000:force:mass-erase:leave -d 0483:df11
[sudo] password for mks:
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 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/
dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash "
Performing mass erase, this can take a moment
Setting timeout to 35 seconds
Downloading to address = 0x08000000, size = 26544
Download [=========================] 100% 26544 bytes
Download done.
File downloaded successfully
Transitioning to dfuMANIFEST state
After flashing, dmesg
just shows
[ 1760.710344] usb 1-1: USB disconnect, device number 2
(nothing else after that).
I couldn’t find a real datasheet for the Board that they are using, just images from replacement parts… Artillery3d Mainboard For SW-X4 PRO / X4 Plus
Can anyone tell me what I’m supposed to flash in what order, so that the MCU will work again? I’m not entirely clear how the bootloader chain is supposed to work, so I’ve just been trying solutions to similar problams I’ve found.
I’ve already tried the steps from here (with STM32F401 replaced with STM32F407): Sidewinder X4 Pro flash STM32F401xc - #5 by AutoComplete
But for me after the CanBoot flashing step, the MCU just doesn’t show up
Right now the klipper Version they are using is based on 0.10.X, but I also have my own branch where I ported their changed to the latest master (0.12.X) and had it printing successfully. Right now I’m just back to 0.10.X because I flashed their official image again to make sure none of my changes I made to the system were the problem.