#[solved] Unable to flash AFC-Lite 1.1

1 messages · Page 1 of 1 (latest)

autumn pebble
#

<@&1304550334839918672>
Infimech TX printer (MKS SKIPR v1, no canbus) and Formbot BT kit.
Have been attempting to flash the AFC-Lite without success.
I have used several different guides to flash including these:
https://github.com/xbst/AFC-Lite/blob/master/Docs/AFC-Lite_Manual.pdf
https://usb.esoterical.online/initial_stm32.html
https://canbus.esoterical.online/mainboard_flashing#installing-katapult
https://canbus.esoterical.online/toolhead_flashing/common_hardware/AFC-Lite/README.html
However, the one step that always fails is the actual write when in DFU mode.
The AFC is confirmed in DFU mode and I do get the "File downloaded successfully" message each time.
When running ls /dev/serial/by-id/*, only the .../usb-Klipper... device is displayed, not the expected .../usb-Katapult... UUID.
The 24v line is connected and both the 5v and 3.3v blue lights are solid on the AFC-Lite.

Any help would be greatly appreciated and possibly prevent me from curb stomping this hardware into Oblivion!

GitHub

Box Turtle Controller PCB. Contribute to xbst/AFC-Lite development by creating an account on GitHub.

shrewd flower
#

If you double tap reset button

Does it go back to katapult mode?

#

Katapult is just the boot loader so if it already had it + Klipper it’s going to still boot up klipper

autumn pebble
#

double tapping reset does not appear to do anything
what is the expected result?

shrewd flower
#

If you selected the option when compiling katapult i would expect it to reboot
Into the boot loader

autumn pebble
#

The option was selected

shrewd flower
#

Details of the process - make menuconfig screenshots of both klipper and katapult as well as full terminal sessions of the flash, may help

autumn pebble
#

Beginning screenshot-a-palooza now

#

BTW, which flashing guide should I actually use?
There are a few differences in each one of them.

shrewd flower
#

i prefer the esoterical ones

plucky gull
#

Just be careful to not go into the the CAN section on esoterical's

autumn pebble
#

pretty sure I did try all of them

#

even the ones I was not supposed to 😦

silk meadow
#

Use Isiks guide, flash without Katapult

autumn pebble
#

Ok, I will hit that one today and track progress

autumn pebble
#

Here we go...........

mks@mkspi:~/klipper$ make clean

mks@mkspi:~/klipper$ make menuconfig
Creating symbolic link out/board
Loaded configuration '/home/mks/klipper/.config'
No changes to save (for '/home/mks/klipper/.config')

#

mks@mkspi:~/klipper$ make
Building out/autoconf.h
Compiling out/src/sched.o
Compiling out/src/command.o
Compiling out/src/basecmd.o
Compiling out/src/debugcmds.o
Compiling out/src/initial_pins.o
Compiling out/src/gpiocmds.o
Compiling out/src/stepper.o
Compiling out/src/endstop.o
Compiling out/src/trsync.o
Compiling out/src/adccmds.o
Compiling out/src/spicmds.o
Compiling out/src/i2ccmds.o
Compiling out/src/pwmcmds.o
Compiling out/src/buttons.o
Compiling out/src/tmcuart.o
Compiling out/src/neopixel.o
Compiling out/src/pulse_counter.o
Compiling out/src/lcd_st7920.o
Compiling out/src/lcd_hd44780.o
Compiling out/src/spi_software.o
Compiling out/src/i2c_software.o
Compiling out/src/thermocouple.o
Compiling out/src/sensor_adxl345.o
Compiling out/src/sensor_lis2dw.o
Compiling out/src/sensor_mpu9250.o
Compiling out/src/sensor_icm20948.o
Compiling out/src/sensor_hx71x.o
Compiling out/src/sensor_ads1220.o
Compiling out/src/sensor_ldc1612.o
Compiling out/src/sensor_angle.o
Compiling out/src/sensor_bulk.o
Compiling out/src/sos_filter.o
Compiling out/src/load_cell_probe.o
Compiling out/src/stm32/watchdog.o
Compiling out/src/stm32/clockline.o
Compiling out/src/stm32/dfu_reboot.o
Compiling out/src/generic/crc16_ccitt.o
Compiling out/src/generic/armcm_boot.o
Compiling out/src/generic/armcm_irq.o
Compiling out/src/generic/armcm_reset.o
Compiling out/src/stm32/stm32h7.o

#

Compiling out/src/../lib/stm32h7/system_stm32h7xx.o
Compiling out/src/generic/armcm_timer.o
Compiling out/src/stm32/stm32h7_gpio.o
Compiling out/src/stm32/gpioperiph.o
Compiling out/src/stm32/stm32h7_adc.o
Compiling out/src/stm32/stm32h7_spi.o
Compiling out/src/stm32/stm32f0_i2c.o
Compiling out/src/stm32/usbotg.o
Compiling out/src/stm32/chipid.o
Compiling out/src/generic/usb_cdc.o
Compiling out/src/stm32/hard_pwm.o
Building out/compile_time_request.o
Version: v0.13.0-154-g9346ad191
Preprocessing out/src/generic/armcm_link.ld
Linking out/klipper.elf
Creating hex file out/klipper.bin

#

mks@mkspi:~/klipper$ lsusb
Bus 005 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 004 Device 007: ID 0483:df11 STMicroelectronics STM Device in DFU Mode
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 1d50:614e OpenMoko, Inc. stm32f401xc
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

#

mks@mkspi:~/klipper$ make flash FLASH_DEVICE=0483:df11
Flashing out/klipper.bin to 0483:df11
sudo dfu-util -d ,0483:df11 -R -a 0 -s 0x8000000:leave -D out/klipper.bin

[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 = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "Internal Flash "
Downloading to address = 0x08000000, size = 34588
Download [=========================] 100% 34588 bytes
Download done.
File downloaded successfully
dfu-util: Error during download get_status

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

If the device is already in bootloader mode it can be flashed with the
following command:
make flash FLASH_DEVICE=0483:df11
OR
make flash FLASH_DEVICE=1209:beba

If attempting to flash via 3.3V serial, then use:
make serialflash FLASH_DEVICE=0483:df11

make: *** [src/stm32/Makefile:107: flash] Error 255

#

mks@mkspi:~/klipper$ ls /dev/serial/by-id/*
/dev/serial/by-id/usb-Klipper_stm32f401xc_17005B000C51323532343337-if00
/dev/serial/by-id/usb-Klipper_stm32h723xx_44002F000551333235363331-if00
mks@mkspi:~/klipper$

silk meadow
#

Looks like a good flash

#

You should see it now

autumn pebble
#

How do I verify at this point?

plucky gull
#

well you put in the serial ID not the CAN UUID

autumn pebble
#

so, how do I change that?

#

I did backup my system prior to jacking around with all this, so maybe I should revert to clean slate and start over?

plucky gull
#

no need for that yet atleast but also a good plan to backup as you did.
I believe the MCU definition is in the main afc.cfg

autumn pebble
#

Ok i have not done anything with that yet

plucky gull
#

well take a look and see if there is an ID listed there.
you seem to have CAN connection listed atm but are wanting to use USB

autumn pebble
#

yea I performed some Google-Fu because I was hitting issues with the CAN thing and probably dorked up something trying to poke and prod

plucky gull
#

But you’re not using CAN lol

autumn pebble
#

hence the confused chihuahua sticker on the post! 🤣

#

To further muddy the waters, I am not seeing the AFC.var file

#

oh wait, typos matter.....

west swan
#

It's gonna be in your AFC_Turtle_1.cfg file, comment out the canuuid and uncomment the serial and put the full path for the AFC board

autumn pebble
#

lemme try that

west swan
autumn pebble
#

ah

plucky gull
#

As for the variable file it will be created when the printer boot successfully the first time and runs prep macro

autumn pebble
#

Cool, great info

west swan
autumn pebble
#

Nope, havent seen that one

#

I suppose reading would help

#

However, after changing AFC_Turtle_1.cfg I get a fluidd error

west swan
#

It guides you through where to edit everything

autumn pebble
west swan
#

What's the error?

autumn pebble
west swan
#

Ah, what are you planning on using for your toolhead sensor?

autumn pebble
#

imma slow copy/paster, but i will read through that series of pages before i tinker with much else.

autumn pebble
#

lol

#

Perhaps that is an issue that I have not considered....

west swan
autumn pebble
#

oh, yea, I already got that put together

#

haven't done anything with it yet, should that be noted in some config file?

west swan
#

In your AFC_Hardware.cfg

autumn pebble
#

Gotcha, so its probably in that documentation that i have failed to read

west swan
#

But if you want to use the buffer as your toolhead sensor in AFC_Hardware.cfg put buffer as pin_tool_start and it should get rid of that message

#

Ok back to work I go

autumn pebble
#

haha, me too.....

autumn pebble
#

ok sweet, it seems now it is at least recognized!
Back to reading....where is the comic book version of these instructions? 😅

autumn pebble
#

Well, I suppose since the AFC-Lite is now flashed, I can close this one!
Thanks @west swan !

#

@plucky gull @shrewd flower Appreciate your assistance!

plucky gull
west swan
#

Or the switches are not standard as the LDO kit and it's just a config update

plucky gull
#

ah yeah fair, formbot kit

autumn pebble
#

Yea, I'm still building the rest, just got tripped up with this flashing portion

plucky gull
#

ah so its not wired?

autumn pebble
#

No, that's next!