bigtreetech / BIGTREETECH-OCTOPUS-Pro

This is OCTOPUS Pro open source material
272 stars 58 forks source link

Bootloader issue with 446 #47

Open insanemal opened 7 months ago

insanemal commented 7 months ago

I have a 446 and I can get it into DFU mode no worries. (BOOT0 is fine)

It flashes klipper and reboots into it fine.

But if I remove the boot0 jumper, it just doesn't work.

make flash FLASH_DEVICE=0483:df11
  Flashing out/klipper.bin to 0483:df11
sudo dfu-util -d ,0483:df11 -R -a 0 -s 0x8008000:leave -D out/klipper.bin

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/

dfu-util: Warning: Invalid DFU suffix signature
dfu-util: 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 = 0x08008000, size = 33996
Erase           [=========================] 100%        33996 bytes
Erase    done.
Download        [=========================] 100%        33996 bytes
Download done.
File downloaded successfully
Submitting leave request...
Transitioning to dfuMANIFEST state
dfu-util: can't detach
Resetting USB to switch back to Run-Time mode

Failed to flash to 0483:df11: Error running dfu-util

And after this, if I check dmesg

[ 3944.420201] usb 1-1.3: new full-speed USB device number 17 using xhci_hcd
[ 3944.532152] usb 1-1.3: New USB device found, idVendor=1d50, idProduct=614e, bcdDevice= 1.00
[ 3944.532169] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3944.532175] usb 1-1.3: Product: stm32f446xx
[ 3944.532179] usb 1-1.3: Manufacturer: Klipper
[ 3944.532183] usb 1-1.3: SerialNumber: 39000800165053424E363620
[ 3944.538024] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device

So it's definitely booting klipper. But now if I turn it off remove boot0 jumper, it will not boot at all.

So I assume boot1 is broken?

How can I reflash it to get it all working again.

TotalSimplicity commented 6 months ago

Having the same problem now...

insanemal commented 6 months ago

I found my issue. It was my BL-Touch. It was connected incorrectly.

I'd try removing things from your board one at a time to see which one is causing the issue.

TotalSimplicity commented 6 months ago

Alright, I'll give that a try.

kevinkga commented 5 months ago

Same here but I can't find a culprit despite disconnecting everything.

When I restart in DFU mode I get another error though: Unable to write tmc spi 'stepper_z' register CHOPCONF

Really not sure what it means