MCU disappear RUMBA32 AUS3d

Basic Information:

Printer Model:
MCU / Printerboard:
klippy.log

Describe your issue:

Hi , i’m in trouble with my rumba32 AUS3d.
i flashed it using kiauh and all seems work for a while.
Then my board is unrecognizable and /dev/serial/ disappear.
I read how to troubleshoot and debian bullseye topics from Sineos and patched my rpi3.

i attached schematic and my config for kiauh hoping they help.
When i tried to connect the board i receive a error message about a PB15 that seems to be reserved for a bus but on the schematics and also in my previous config in mk4duo it works as y endstop.

If i flash again (always in DFU mode) the board it appear again.
i read a old post regarding this board and set the clock reference to 12 MHz instead of 8 MHz that is defaut because of crystal on schematics.

Thank you

dmesg.txt (30.6 KB)
klippy.log (158.6 KB)


The schemtic says 12MHz for the crystal:
image
so this should be correct.

Your dmesg output looks troublesome: It indicates that the board is not correctly recognized as USB device, so it does not even reach the stage where Klipper comes into play.

Hard to tell:

  • Could be an issue with the USB cable
  • Could be a broken USB port on either the host or the board
  • Could be a messed up firmware flash but I doubt this, since you reported that the board worked but then disappeared

As an alternative, you could try a direct USART wiring to the RPi via
image
which would then correspond to the pins PA09, PA10

Hello,
i tried 3 different usb cable, also a custom one that connect directly to pin on motherboard instead of microsub connect that i made for connect mobo to rpi without usb 5v (so mobo takes power only by its power supply).

i’m confident that thw mobo is working correctly.

In klipper log i read that board connects, but because of an error it disconnect and then it also disappears from /dev/serial/

Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1966063520: New connection webhooks client 1966063520: Client info {'program': 'Moonraker', 'version': 'v0.8.0-39-g6c7dfe5'} Loaded MCU 'mcu' 117 commands (v0.11.0-197-ga3eebab4 / gcc: (15:8-2019-q3-1+b1) 8.3.1 20190703 (release) [gcc-8-branch revision 273027] binutils: (2.34-4+rpi1+14) 2.34) MCU 'mcu' config: ADC_MAX=4095 BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c1a=PB8,PB9 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_i2c3=PA8,PC9 BUS_PINS_sdio=PC12,PD2,PC8,PC9,PC10,PC11 BUS_PINS_spi1=PA6,PA7,PA5 BUS_PINS_spi1a=PB4,PB5,PB3 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_spi3=PB4,PB5,PB3 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi4=PE13,PE14,PE12 CLOCK_FREQ=180000000 MCU=stm32f446xx PWM_MAX=255 RESERVE_PINS_USB=PA11,PA12 RESERVE_PINS_crystal=PH0,PH1 STATS_SUMSQ_BASE=256 STEPPER_BOTH_EDGE=1 Config error Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 180, in _connect cb() File "/home/pi/klipper/klippy/mcu.py", line 753, in _connect self._send_config(None) File "/home/pi/klipper/klippy/mcu.py", line 692, in _send_config cmdlist[i] = pin_resolver.update_command(cmd) File "/home/pi/klipper/klippy/pins.py", line 53, in update_command return re_pin.sub(pin_fixup, cmd) File "/home/pi/klipper/klippy/pins.py", line 50, in pin_fixup raise error("pin %s is reserved for %s" % ( pins.error: pin PB15 is reserved for spi2 Attempting MCU 'mcu' reset command webhooks client 1966063520: Disconnected Restarting printer Start printer at Wed Sep 6 00:55:53 2023 (1693954553.1 555.7)

So i tried to connect via uart :

rpi TX (gpio14) → rumba ext3 12 RX
rpi RX (gpio15) → rumba ext3 11 TX

and reflash mobo with uart instead of usb but it didn’t work because kiauh didn’t find /dev/serial/ on my rpi.

So i think i will try to erase the rpi again and try from scratch all the procedure because i’m not able to understand why /dev/serial is missing and i don’t know how to solve this issue and if it is the root cause of my fails.

Thank you for your time.
I will keep you updated

The klippy.log is not the relevant information here. The relevant bits are in the dmesg output. As long as this is showing USB issues on the hardware level, you will have no fun

If you do the direct UART wiring, then there will be no /dev/serial/*. In this case, the board connects via /dev/ttyS0 or /dev/ttyAMA0, depending on the pins you have chosen on the RPi.
Also, make sure you have correctly configured your RPi for UART.

Worth a try but, to be honest, I doubt that it will change anything.

Now i don’t have my RPI here but i remember that it connect to AMA0 but the download failed because kiauh was not able to find /serial/dev/id- something.
However i’m not sure that my rpi is ready for uart (as i wrote i never user it before so i will give a check)

Thank you!

###### List of available MCU:
 ● MCU #1: ttyS0
 ● MCU #2: ttyAMA0

###### Select MCU to flash: 1

###### You selected:
 ● MCU #1: /dev/ttyS0

###### Continue? (Y/n): y
   [➔] Yes

###### Flashing /dev/ttyS0 ...

###### Stop klipper.service ...
[✓ OK] Stop klipper.service successfull!
  Building hid-flash
gcc -c -Wall -std=gnu99 -I . `pkg-config libusb-1.0 --cflags` main.c -o main.o
gcc -c -Wall -std=gnu99 -I . `pkg-config libusb-1.0 --cflags` hid-libusb.c -o hid-libusb.o
gcc -c -Wall -std=gnu99 -I . `pkg-config libusb-1.0 --cflags` rs232.c -o rs232.o
gcc -no-pie main.o hid-libusb.o rs232.o `pkg-config libusb-1.0 --libs` -lrt -lpthread -o hid-flash
  Flashing out/klipper.bin to /dev/ttyS0

Failed to flash to /dev/ttyS0: Unable to find serial 'by-path' folder

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=/dev/ttyS0

make: *** [src/stm32/Makefile:111: flash] Error 255
>>>>>> Flashing failed!
>>>>>> Please read the console output above!

###### Start klipper.service ...
[✓ OK] Start klipper.service successfull!
/=======================================================\

I connected rpi tx to rumba rx, rx to tx and gnd
put the rumba in DFU mode and tried to flash but i have only fails …
This are my settings
config_UART

i tried to change also the RPI but i continue to have same error in dmesg.
:frowning:

  • Try

    cd ~/klipper
    make serialflash FLASH_DEVICE=/dev/ttyS0
    
  • Or

    make flash FLASH_DEVICE=/dev/ttyS0
    
  • Or uploading klipper.bin to the SD card and reboot the board.

  • Make sure it is really /dev/ttyS0

  • Make sure the TX goes to RX and vice versa

  • Install sudo apt install stm32flash → What does the following command return?

    stm32flash /dev/ttyS0
    

First try

pi@raspberrypi:~/klipper $ make serialflash FLASH_DEVICE=/dev/ttyS0
  Flashing out/klipper.bin to /dev/ttyS0 via stm32flash
stm32flash 0.5

http://stm32flash.sourceforge.net/

Using Parser : Raw BINARY
Error probing interface "serial_posix"
Cannot handle device "/dev/ttyS0"
Failed to open port: /dev/ttyS0

make: *** [src/stm32/Makefile:115: serialflash] Error 1
pi@raspberrypi:~/klipper $

stm32flash /dev/ttyS0

pi@raspberrypi:~/klipper $ stm32flash /dev/ttyS0
stm32flash 0.5

http://stm32flash.sourceforge.net/

Error probing interface "serial_posix"
Cannot handle device "/dev/ttyS0"
Failed to open port: /dev/ttyS0

pi@raspberrypi:~/klipper $

i tried also to set speed to 57600 instead of 250000

Nothing seems work.

Have you tried /dev/ttyAMA0?

pi@raspberrypi:~/klipper $ make serialflash FLASH_DEVICE=/dev/ttyAMA0
  Flashing out/klipper.bin to /dev/ttyAMA0 via stm32flash
stm32flash 0.5

http://stm32flash.sourceforge.net/

Using Parser : Raw BINARY
Interface serial_posix: 57600 8E1
Failed to send init to device

make: *** [src/stm32/Makefile:115: serialflash] Error 1
pi@raspberrypi:~/klipper $

dmesg_uart.txt (27.0 KB)

I attached the dmesg without usb connected if it can help …
How can i test if uart is correctly woriking?

I connected only tx rx and gnd between rpi and rumba and tumba is powered.

Thank you

Looks better than the attempt via /dev/ttyS0 but still runs into an error.

Sorry no further idea, except:

Another desperate thing to try:

I tried (before read your reply) again with usb port.
for to enter in DFU i press reset and boot, then release reset and last release boot.
lsusb find it

then i install software and it WORKS, i can homing all axis and do a PID to extruder and save the config.
BUT if i need to restart firmware all stop to work and i MUST re enter in DFU mode and flash again the board.
If i shutdown and restart the rumba i must reflash it for to work.
i saw that when it works i have /dev/serial/by-id, when i reboot firmware it disappears (and it is why kilipper won’t connect). after reflash without any operation into rpi /dev/serial/by-id reappear and start to work perfectly.

About youre reply:

  • i don’t have a SD (before i used a mk4duo firmware with a octoprint Rpi)
  • i tried also to change tx and rx
  • i will give a look to this article
    -i tried to flash via uart in normal mode and in dfu mode without any result …
[26665.780291] usb 1-1.3: New USB device found, idVendor=0483, idProduct=df11, bcdDevice=22.00
[26665.780326] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[26665.780344] usb 1-1.3: Product: STM32  BOOTLOADER
[26665.780357] usb 1-1.3: Manufacturer: STMicroelectronics
[26665.780371] usb 1-1.3: SerialNumber: STM32FxSTM32
[26786.439061] usb 1-1.3: reset full-speed USB device number 72 using dwc_otg
[26786.580799] usb 1-1.3: device firmware changed
[26786.581022] usb 1-1.3: USB disconnect, device number 72
[26786.679097] usb 1-1.3: new full-speed USB device number 73 using dwc_otg
[26786.826430] usb 1-1.3: New USB device found, idVendor=1d50, idProduct=614e, bcdDevice= 1.00
[26786.826457] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[26786.826465] usb 1-1.3: Product: stm32f446xx
[26786.826471] usb 1-1.3: Manufacturer: Klipper
[26786.826477] usb 1-1.3: SerialNumber: 420040001551363131363530
[26786.833875] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device
pi@raspberrypi:~ $

id dmesg i found this ttyACM0 …
what about it?

Thank you again!

This is you “raw” STM chip in bootloader mode.
After the firmware flash:

This is exactly how a properly flashed Klipper board looks like in dmesg.
ttyACM0 is how such a device registers in Linux and is also mapped by Linux to /dev/serial/by-id/.... You could use /dev/ttyACM0 directly in your config as well, but you have a high chance that next time you boot, it would enumerate as ttyACM1. This is why the by-id is recommended. This will stay stable.

I have no clue why this only works in DFU mode for you.
Could be a borked bootloader thats why I suggested to try Katapult, aka Canboot.

i checked and effectively also ttyACM0 disappear after a firmware reboot …

i’m a bit scared to use katapult because i’m not so familiar with this kind of tasks …
there are lot of things to configure and i’m terrorized to brick my board :frowning:

Also i don’t understand why it had always work with mk4duo.

i will start to study katapult … objectively i don’t see other alternative …

There is nothing to worry. It is quite straight forward:

  1. Get and build: GitHub - Arksine/katapult: Configurable bootloader for Klipper
  2. Options:
    • Microcontroller Architecture: stm32
    • Processor model: stm32f446
    • Clock Reference: 12 MHz
    • Communication interface: USB
    • Support bootloader entry on rapid double click of reset button: Yes
  3. Copy bin to your Windows PC
  4. Get install STM32CubeProgrammer
  5. Attach the board to your Windows PC and boot into DFU: Hold BOOT0 , press RESET , release BOOT0
  6. Flash with full erase
  7. Return to your RPi
  8. Check with sudo dmesg. Should look similar to:
  9. Flash Klipper with make FLASH FLASH_DEVICE=/dev/<device> (replace the <device> as shown in dmesg)

Hello :slight_smile:
i tried to connect my board to STMCUBE last revision but win10 home continue to make the “detection sound” but nothing appears …
Seems that the board is unable to connect … i tried to refresh some times and randomly it detect something but i receive a error message.
I will try with another pc because my hp seems to have some incompatibility with stmcube …

is it possible to flash katapult directly from rpi?

Thanks

Never done it from within Linux directly and without a STLink.
Theoretically it should be:

sudo dfu-util -a 0 -D ~/katapult/out/katapult.bin --dfuse-address 0x08000000:force:mass-erase:leave -d 0483:df11

This -d 0483:df11 you need to get from the lsusb command.

I’d love to get @Arksine blessing before you need to buy a STLink adapter (although they come in handy always and are quite cheap) :innocent:

:smiley:

I tried with other pc and i had same results … in DFU mode te board connect and disconnect continuously …
stm

So I think my last resort is the rpi… which in the end is the only device that seems to work with this mismatched card …

waiting for @Arksine :slight_smile:

Ok now i can connect to STMCUBE

i tried to download but nothing change …
this are the settings:

i used automatic mode and this is the result:

[125479.618711] usb 1-1.3: New USB device found, idVendor=0483, idProduct=df11,                                               bcdDevice=22.00
[125479.618743] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumbe                                              r=3
[125479.618762] usb 1-1.3: Product: STM32  BOOTLOADER
[125479.618776] usb 1-1.3: Manufacturer: STMicroelectronics
[125479.618791] usb 1-1.3: SerialNumber: STM32FxSTM32
[125483.772663] usb 1-1.3: USB disconnect, device number 118
[126627.878796] usb 1-1.3: new full-speed USB device number 119 using dwc_otg
[126628.020221] usb 1-1.3: New USB device found, idVendor=0483, idProduct=df11,                                               bcdDevice=22.00
[126628.020260] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumbe                                              r=3
[126628.020278] usb 1-1.3: Product: STM32  BOOTLOADER
[126628.020293] usb 1-1.3: Manufacturer: STMicroelectronics
[126628.020307] usb 1-1.3: SerialNumber: STM32FxSTM32
[126632.702684] usb 1-1.3: USB disconnect, device number 119
[126638.888825] usb 1-1.3: new full-speed USB device number 120 using dwc_otg
[126639.035847] usb 1-1.3: New USB device found, idVendor=1d50, idProduct=614e,                                               bcdDevice= 1.00
[126639.035887] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumbe                                              r=3
[126639.035906] usb 1-1.3: Product: stm32f446xx
[126639.035920] usb 1-1.3: Manufacturer: Klipper
[126639.035935] usb 1-1.3: SerialNumber: 420040001551363131363530
[126639.040418] cdc_acm 1-1.3:1.0: ttyACM1: USB ACM device
[126649.856694] usb 1-1.3: USB disconnect, device number 120
[126651.948883] usb 1-1.3: new full-speed USB device number 121 using dwc_otg
[126652.090223] usb 1-1.3: New USB device found, idVendor=0483, idProduct=df11,                                               bcdDevice=22.00
[126652.090262] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumbe                                              r=3
[126652.090281] usb 1-1.3: Product: STM32  BOOTLOADER
[126652.090296] usb 1-1.3: Manufacturer: STMicroelectronics
[126652.090310] usb 1-1.3: SerialNumber: STM32FxSTM32
pi@raspberrypi:~ $

i think that download with stmcube didn’t work …
Do i need to erase manually the chip with command i sigjed in red?
I apologize but i’m a rookie in programming :slight_smile: … and i don’t want to buy a programmer :smiley: