Random freeze/ lost connection to MCU

Basic Information:

Printer Model: Voron 2.4 350
MCU / Printerboard: Fysetc Spider v3
Host / SBC: rpi4 MODEL b
klippy.log

Hello,
I have random freezes ( rpi not respont/no ssh/ klipperscreen freeze) and random lost connection to Mcu. Sometimes it happens after 3hrs or 30 min during the prints. The pi is powered by the fysetc board. Same issue if I change the power supply to the official rpi power brick.

There are a logitech webcam, canbus adapter, and hardware buttons attached to the usb ports.

this is the log from the latest disconnect:
klippy.zip (5.0 MB)

dmsg shows the following:

[20905.998770] brcmfmac: brcmf_sdio_hdparse: HW header checksum error
[20905.998788] brcmfmac: brcmf_sdio_rxfail: terminate frame
[20908.414658] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
[20908.417870] ieee80211 phy0: brcmf_cfg80211_dump_station: BRCMF_C_GET_ASSOCLIST failed, err=-110

Your description sounds like a hardware stability issue on the Linux/RPi level. Potentially caused by additionally attached hardware. The dmesg output points to an issue with the Wi-Fi adapter, but this is not necessarily the root cause.

I had an another disconnect, now with the wifi turned off.

brcmfmac: brcmf_set_channel: set chanspec 0xd0a5 fail, reason -52

the changes I made:

  1. turned off wlan power saving
  2. added over_voltage=2 to boot config

Just as a long shot: Try Raspberry pi freezes completely if rebooted while mainboard is kept powered - #6 by Sineos

Hi I tried and have the same issue.
I removed all the USB from the pi (except the MCU) and it made it even worse, it is not connecting at all anymore.
After I tried to update the mcu firmware to the latest version - no success
then I tried to reinstall everything from scratch - still can’t connect.

This is the error from klippy log:

mcu ‘mcu’: Starting CAN connect
Created a socket
webhooks client 3914915312: New connection
webhooks client 3914915312: Client info {‘program’: ‘Moonraker’, ‘version’: ‘v0.9.3-72-g7cdcca3’}
mcu ‘mcu’: Timeout on connect
Created a socket
mcu ‘mcu’: Wait for identify_response
Traceback (most recent call last):
File “/home/pi/klipper/klippy/serialhdl.py”, line 68, in _get_identify_data
params = self.send_with_response(msg, ‘identify_response’)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/pi/klipper/klippy/serialhdl.py”, line 262, in send_with_response
return src.get_response([cmd], self.default_cmd_queue)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/pi/klipper/klippy/serialhdl.py”, line 319, in get_response
self.serial.raw_send_wait_ack(cmds[-1], minclock, reqclock,
File “/home/pi/klipper/klippy/serialhdl.py”, line 254, in raw_send_wait_ack
self._error(“Serial connection closed”)
File “/home/pi/klipper/klippy/serialhdl.py”, line 61, in _error
raise error(self.warn_prefix + (msg % params))
serialhdl.error: mcu ‘mcu’: Serial connection closed

I have no idea what is going on but I’m fairly sure it’s a software issue because no hardware change was made

Your dmesg output unlikely is a software issue, at least not one related to Klipper.

I think I found the cause of the issue. the fysetc hardware button put the main MCU in a connect/disconnect loop.

anyone have an idea how to troubleshoot this?