The Klipper has been shutting down while printing. I have tried using different cables for the printer connection and still the error pops up. I have tried calibrating the hot end and the heated bed but still the error exists. But the shutdown does not always happen on the same layer, it happens on different time during the printer. Kindly help me to identify the issue.
[mcu]
serial = /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method = command
Unfortunately, there is not a lot we can do here.
You can probably look at your Dmesg, maybe there are USB-related messages.
sudo dmesg
# or
journalctl -k
Or you can try to change the connection to direct UART if possible, maybe it would work better.
I can only guess that it is probably a grounding issue between SBC and MCU, but it is only a guess.
(Generally, USB devices have power provided by USB, and GND connected between USB devices)
(Generally, I would expect that RPI powered by step-down converter from printer PSU, would have less issues, in comparison to when there are 2 independent PSU, one for RPI and one for the printer)
(Ah, yes, this issue does not directly mean that one of PSU is bad or something, it can be an issue, but it does not mean that).