Random Error During Print "Can not update MCU 'mcu' config as it is shutdown"

Basic Information:

Printer Model: Ender 3 PRO
MCU / Printerboard: BTT SKR Mini E3 V3
klippy.log
klippy.zip (1.3 MB)

Hey everyone, I’ve been chasing this issue for a month or so now. At random times while printing my printer will stall out and I will get this error on Mainsail. I’m using a RPI 2b 1GB connected to SKR Mini E3 V3 via USB.

“Can not update MCU ‘mcu’ config as it is shutdown. Once the underlying issue is corrected, use the “FIRMWARE_RESTART” command to reset the firmware, reload the config, and restart the host software. Error configuring printer.”

In the klippy log I’m seeing the following…

MCU error during connect
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 747, in _connect
config_params = self._send_get_config()
File “/home/pi/klipper/klippy/mcu.py”, line 733, in _send_get_config
raise error(“Can not update MCU ‘%s’ config as it is shutdown” % (
mcu.error: Can not update MCU ‘mcu’ config as it is shutdown
Build file /home/pi/klipper/klippy/…/.config(3398): Fri Jun 16 22:02:16 2023

I’ve reflashed the board several times, I removed the pi cam I and uninstalled crowsnest, I’ve done the fix in the pinned bulletin for the Debian 11 bug, played around with the MCU “restart_method:”, used various usb cables, checked the cables running to and from the PSU and added wire ferrules, and moved the printer to different outlets throughout my apartment. I have ferrite beads on order but at this point I’m not sure what else to look at. Any suggestions would be greatly appreciated! If my printer.cfg or anything else will be useful to diagnose just let me know.

Oddly enough, I had a 11 hour print finish successfully over the night only for another print to stall out with the same error less than 2 hours into it this morning. Would this suggest it is more likely a hardware issue vs firmware/config?

Your klippy.log does not contain any meaningful errors. The Can not update MCU ‘mcu’ config as it is shutdown message is an indication that the printer board has been in an error state and has not been properly reset. Unfortunately, your log does not contain the original error

Thank you for your response. Today I moved over to Debian 12 as I had heard that had helped a few other people but after installing it I experienced the same issue I have been having. This time however I got a little bit more out of the klippy log. I’ve attached the new klippy log but I think this is the important part. Any suggestions would be appreciated.

=============== Log rollover at Wed Jul 5 12:02:32 2023 ===============
mcu ‘mcu’: Unable to open serial port: [Errno 2] could not open port /dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00: [Errno 2] No such file or directory: ‘/dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00’
mcu ‘mcu’: Unable to open serial port: [Errno 2] could not open port /dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00: [Errno 2] No such file or directory: ‘/dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00’
mcu ‘mcu’: Unable to open serial port: [Errno 2] could not open port /dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00: [Errno 2] No such file or directory: ‘/dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00’
mcu ‘mcu’: Unable to open serial port: [Errno 2] could not open port /dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00: [Errno 2] No such file or directory: ‘/dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00’
mcu ‘mcu’: Unable to open serial port: [Errno 2] could not open port /dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00: [Errno 2] No such file or directory: ‘/dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00’
mcu ‘mcu’: Unable to open serial port: [Errno 2] could not open port /dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00: [Errno 2] No such file or directory: ‘/dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00’
mcu ‘mcu’: Unable to open serial port: [Errno 2] could not open port /dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00: [Errno 2] No such file or directory: ‘/dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00’
mcu ‘mcu’: Unable to open serial port: [Errno 2] could not open port /dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00: [Errno 2] No such file or directory: ‘/dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00’
mcu ‘mcu’: Unable to open serial port: [Errno 2] could not open port /dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00: [Errno 2] No such file or directory: ‘/dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00’
mcu ‘mcu’: Unable to open serial port: [Errno 2] could not open port /dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00: [Errno 2] No such file or directory: ‘/dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00’
mcu ‘mcu’: Unable to open serial port: [Errno 2] could not open port /dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00: [Errno 2] No such file or directory: ‘/dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00’
mcu ‘mcu’: Unable to open serial port: [Errno 2] could not open port /dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00: [Errno 2] No such file or directory: ‘/dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00’
mcu ‘mcu’: Unable to open serial port: [Errno 2] could not open port /dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00: [Errno 2] No such file or directory: ‘/dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00’
mcu ‘mcu’: Unable to open serial port: [Errno 2] could not open port /dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00: [Errno 2] No such file or directory: ‘/dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00’
mcu ‘mcu’: Unable to open serial port: [Errno 2] could not open port /dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00: [Errno 2] No such file or directory: ‘/dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00’
mcu ‘mcu’: Unable to open serial port: [Errno 2] could not open port /dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00: [Errno 2] No such file or directory: ‘/dev/serial/by-id/usb-Klipper_stm32g0b1xx_2D0033000F50415833323520-if00’
MCU error during connect
Traceback (most recent call last):
File “/home/pi/klipper/klippy/mcu.py”, line 798, in _mcu_identify
self._serial.connect_uart(self._serialport, self._baud, rts)
File “/home/pi/klipper/klippy/serialhdl.py”, line 182, in connect_uart
self._error(“Unable to connect”)
File “/home/pi/klipper/klippy/serialhdl.py”, line 61, in _error
raise error(self.warn_prefix + (msg % params))
serialhdl.error: mcu ‘mcu’: Unable to connect

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/pi/klipper/klippy/klippy.py”, line 176, in _connect
self.send_event(“klippy:mcu_identify”)
File “/home/pi/klipper/klippy/klippy.py”, line 263, in send_event
return [cb(*params) for cb in self.event_handlers.get(event, )]
File “/home/pi/klipper/klippy/klippy.py”, line 263, in
return [cb(*params) for cb in self.event_handlers.get(event, )]
File “/home/pi/klipper/klippy/mcu.py”, line 803, in _mcu_identify
raise error(str(e))
mcu.error: mcu ‘mcu’: Unable to connect
Build file /home/pi/klipper/klippy/…/.config(3398): Fri Jun 30 19:31:57 2023

klippynewest.txt (5.2 MB)

Check Debian Bullseye Bug causing Klipper to no longer find the printer board
Nope, you wrote Debian 12.

Unplug the board, replug it and then upload (no screenshot, attach a text file) the output of sudo dmesg

dmesg.txt (29.2 KB)

I also tried running it by-path instead of by-id but the issue popped up again during another print.

[ 1478.394815] usb 1-1.3: USB disconnect, device number 4
[ 1478.707828] usb 1-1.3: new full-speed USB device number 6 using dwc_otg
[ 1478.842277] usb 1-1.3: New USB device found, idVendor=1d50, idProduct=614e, bcdDevice= 1.00
[ 1478.842317] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1478.842333] usb 1-1.3: Product: stm32g0b1xx
[ 1478.842346] usb 1-1.3: Manufacturer: Klipper
[ 1478.842357] usb 1-1.3: SerialNumber: 2D0033000F50415833323520
[ 1478.844159] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device

This is looking good. Your printer board is properly recognized by Linux as a Klipper flashed board.

According to your last klippy.log the board correctly connects to the Klipper host. What is the current issue?

So basically, everything works great until it doesn’t. I never seem to have connection issues initially but randomly during most prints the printer will stall out, halting any movements, heaters turn off, leaving only the hot end fan on. On mainsail when this happens I am presesnted with “Can not update MCU ‘mcu’ config as it is shutdown.” I don’t know for sure it is a connection issue but I have found in a couple klippy logs where it says cannot open serial port or failed automated reset of mcu. I really feel like I’m just grasping at straws here.

A wise word :joy:

Have you considered EMI issues that lead to communication failure?

1 Like

Please provide a fresh log showing the issue.
As indicated, the “Can not update MCU…" is a consequential issue of an event that happened earlier. Make sure to provide a log that contains this earlier event as well.

I started fresh and installed mainsail and everything on a different sd card in the pi yesterday and had successful prints all day. 85% into a 10 hour print today the issue presented itself again. I have attached the fresh klippy log. I had to compress it as the file size was too big to upload.
klippy.zip (3.6 MB)

This is pretty confusing.
The only error I can see in the logs is mcu.error: Can not update MCU 'mcu' config as it is shutdown.
This error only happens if the MCU has been shut down for whatever reason and has not been properly reset. Still and unfortunately, this “whatever reason” is not in the log (or I’m missing it).

Edit: I asked if you checked the USB cable. But nevermind, you wrote you checked the USB cable. Sorry.

So, I relocated the printer to my dining room yesterday and have been churning out prints and I have yet to have any issues so far. You may be on to something with your EMI theory…

1 Like

Is the a fridge, an AC or some other heavy electrical device nearby at the former place?

The AC and my wireless router are on the other side of the wall where it was. I also had a pi400 and a monitor setup right next to my printer. Also, with living in an apartment who knows what my neighbors have going on, on their side of the wall.

I did experience my BTT TFT35 scrambling periodically when I was running Marlin which is supposedly caused by EMI.

I have ferrite beads arriving today and I’ll look into what else I can do for shielding… or I’ll just leave it right where it is. I appreciate everyone’s assistance with this!

1 Like