Weird firmware update issue

Today fluidd complained that my MCUs were not up to date. I proceeded to make and flash the firmware for my two S6 as always and everything worked as expected. I restarted klipper and was able to print all day long.

Then I rebooted and got the same error again (host=v0.9.1-576-ge520fb78, mcu=v0.9.1-471-gf2b382db aux=v0.9.1-471-gf2b382db). I upgraded them again this time from a clean klipper repository and it did the same thing. I can print without issue but as soon as I reboot the host I get the error again.

Any idea?

Make sure to have set the 64KIB bootloader and verify that after the upgrade the firmware.bin is renamed to firmware.cur.

thanks for your reply. The bootloader is 64kib and the crystal at 12mhz.

I’ve always used “make flash FLASH_DEVICE” and worked flawlessly until now.

This is the flash message:

Flashing out/klipper.bin to /dev/serial/by-id/usb-Klipper_stm32f446xx_37004C000951363131343032-if00
Entering bootloader on /dev/serial/by-id/usb-Klipper_stm32f446xx_37004C000951363131343032-if00
Device reconnect on /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0
sudo dfu-util -p 1-1.3 -R -a 0 -s 0x8010000:leave -D out/klipper.bin

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  "
Downloading to address = 0x08010000, size = 22380
Download	[=========================] 100%        22380 bytes
Download done.
File downloaded successfully
Transitioning to dfuMANIFEST state
dfu-util: can't detach
Resetting USB to switch back to runtime mode

After the update if I check the log it seems that everything’s in in order:

Loaded MCU 'mcu' 91 commands (v0.9.1-576-ge520fb78 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1)
...
Loaded MCU 'aux' 91 commands (v0.9.1-576-ge520fb78 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1)
...
Loaded MCU 'rpi' 101 commands (v0.9.1-576-ge520fb78 / gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1)
MCU 'rpi' config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 STEP_DELAY=2 MCU=linux STATS_SUMSQ_BASE=256

All MCUs seem up to date. But if I reboot MCU and AUX are back to v0.9.1-471-gf2b382db

Very strange.

Two ideas:

2 Likes

I updated both the bootloader and the firmware from the ST application (it didn’t work from the SD card) and for some reason now it seems to be working. I noticed that the bootloader was updated recently… not sure if that was the problem. Hopefully this doesn’t happen again the next time there’s a firmware upgrade…

Thanks again.