Printer Model: Ender3
MCU / Printerboard: AVR Atmega1284P
Host / SBC Raspberry PI 4B (4GB)
Attachement List:
crowsnest.log (2.4 MB)
klippy (1).log (4.2 MB)
moonraker.log (6.8 KB)
printer.cfg (5.0 KB)
I have Ender3 with AVR Atmega 1284P since almost 1+ years. i have updated klipper on 20th April 2025. after that update faced problem of klipper stopped with error "Klipper Internal error on command:“G1” for almost 4 times. i have restart Raspberry pi and printer MCU but still print stopped with same fault. i have attached log files and printer config file for reference.
1 Like
The real error is:
b'stepcompress o=3 i=0 c=89 a=0: Invalid sequence'
The right question is “Why?” =\
Loaded MCU 'mcu' 121 commands (v0.13.0-50-gf2b27d17b / gcc: (GCC) 5.4.0 binutils: (GNU Binutils) 2.26.20160125)
MCU 'mcu' config: ADC_MAX=1023 BUS_PINS_spi=PB6,PB5,PB7 BUS_PINS_twi=PC0,PC1 CLOCK_FREQ=16000000 MCU=atmega1284p PWM_MAX=255 RECEIVE_WINDOW=192 RESERVE_PINS_serial=PD0,PD1 SERIAL_BAUD=250000 STATS_SUMSQ_BASE=256 STEPPER_OPTIMIZED_UNSTEP=40 STEPPER_STEP_BOTH_EDGE=1
Configured MCU 'mcu' (1024 moves)
Loaded MCU 'rpi' 124 commands (v0.12.0-432-gfec3e685c / gcc: (Debian 10.2.1-6) 10.2.1 20210110 binutils: (GNU Binutils for Debian) 2.35.2)
MCU 'rpi' config: ADC_MAX=4095 CLOCK_FREQ=50000000 MCU=linux PCA9685_MAX=4096 PWM_MAX=32768 STATS_SUMSQ_BASE=256
Configured MCU 'rpi' (1024 moves)
Args: ['/home/TechnoKlipper/klipper/klippy/klippy.py', '/home/TechnoKlipper/printer_data/config/printer.cfg', '-l', '/home/TechnoKlipper/printer_data/logs/klippy.log', '-I', '/home/TechnoKlipper/printer_data/comms/klippy.serial', '-a', '/home/TechnoKlipper/printer_data/comms/klippy.sock']
Git version: 'v0.13.0-50-gf2b27d17b'
Branch: master
Remote: origin
Tracked URL: https://github.com/Klipper3d/klipper.git
This is not a TMC driver, so there is mostly no new or adjusted code.
On a second glance:
receive_seq=4618 retransmit_seq=0 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 upcoming_bytes=0 freq=50000178 adj=49999383 sd_pos=142142 heater_bed: target=60 temp=59.9 pwm=0.177 sysload=0.13 cputime=144.898 memavail=3474012 print_time=4433.763 buffer_time=2.210 print_stall=0 extruder: target=220 temp=220.1 pwm=0.417
b'Got EOF when reading from device'
Stats 4456.9: gcodein=0 mcu: mcu_awake=0.056 mcu_task_avg=0.000265 mcu_task_stddev=0.000260 bytes_write=1227708 bytes_read=733210 bytes_retransmit=27 bytes_invalid=0 send_seq=45569 receive_seq=45569 retransmit_seq=2 srtt=0.003 rttvar=0.000 rto=0.025 ready_bytes=56 upcoming_bytes=0 freq=16000266 rpi: mcu_awake=0.001 mcu_task_avg=0.000012 mcu_task_stddev=0.000023 bytes_write=27902 bytes_read=87977 bytes_retransmit=0 bytes_invalid=0 send_seq=4619 receive_seq=4619 retransmit_seq=0 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 upcoming_bytes=0 freq=50000182 adj=49999391 sd_pos=142258 heater_bed: target=60 temp=59.9 pwm=0.182 sysload=0.13 cputime=144.937 memavail=3474028 print_time=4434.718 buffer_time=2.163 print_stall=0 extruder: target=220 temp=220.0 pwm=0.464
Stats 4457.9: gcodein=0 mcu: mcu_awake=0.056 mcu_task_avg=0.000265 mcu_task_stddev=0.000260 bytes_write=1227708 bytes_read=733210 bytes_retransmit=27 bytes_invalid=0 send_seq=45569 receive_seq=45569 retransmit_seq=2 srtt=0.003 rttvar=0.000 rto=0.025 ready_bytes=56 upcoming_bytes=792 freq=16000266 rpi: mcu_awake=0.001 mcu_task_avg=0.000012 mcu_task_stddev=0.000023 bytes_write=27908 bytes_read=87993 bytes_retransmit=0 bytes_invalid=0 send_seq=4620 receive_seq=4620 retransmit_seq=0 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 upcoming_bytes=0 freq=50000179 adj=49999429 sd_pos=142258 heater_bed: target=60 temp=59.9 pwm=0.182 sysload=0.13 cputime=144.958 memavail=3474040 print_time=4435.632 buffer_time=2.076 print_stall=0 extruder: target=220 temp=220.0 pwm=0.464
Stats 4458.9: gcodein=0 mcu: mcu_awake=0.056 mcu_task_avg=0.000265 mcu_task_stddev=0.000260 bytes_write=1227708 bytes_read=733210 bytes_retransmit=27 bytes_invalid=0 send_seq=45569 receive_seq=45569 retransmit_seq=2 srtt=0.003 rttvar=0.000 rto=0.025 ready_bytes=56 upcoming_bytes=1572 freq=16000266 rpi: mcu_awake=0.001 mcu_task_avg=0.000012 mcu_task_stddev=0.000023 bytes_write=27914 bytes_read=88009 bytes_retransmit=0 bytes_invalid=0 send_seq=4621 receive_seq=4621 retransmit_seq=0 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 upcoming_bytes=0 freq=50000175 adj=49999383 sd_pos=142346 heater_bed: target=60 temp=59.9 pwm=0.182 sysload=0.12 cputime=144.972 memavail=3474040 print_time=4436.636 buffer_time=2.080 print_stall=0 extruder: target=220 temp=220.0 pwm=0.464
Stats 4459.9: gcodein=0 mcu: mcu_awake=0.056 mcu_task_avg=0.000265 mcu_task_stddev=0.000260 bytes_write=1227708 bytes_read=733210 bytes_retransmit=27 bytes_invalid=0 send_seq=45569 receive_seq=45569 retransmit_seq=2 srtt=0.003 rttvar=0.000 rto=0.025 ready_bytes=56 upcoming_bytes=1963 freq=16000266 rpi: mcu_awake=0.001 mcu_task_avg=0.000012 mcu_task_stddev=0.000023 bytes_write=27920 bytes_read=88025 bytes_retransmit=0 bytes_invalid=0 send_seq=4622 receive_seq=4622 retransmit_seq=0 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 upcoming_bytes=0 freq=50000174 adj=49999335 sd_pos=142428 heater_bed: target=60 temp=59.9 pwm=0.182 sysload=0.12 cputime=144.987 memavail=3474040 print_time=4437.985 buffer_time=2.428 print_stall=0 extruder: target=220 temp=220.0 pwm=0.464
Stats 4460.9: gcodein=0 mcu: mcu_awake=0.056 mcu_task_avg=0.000265 mcu_task_stddev=0.000260 bytes_write=1227708 bytes_read=733210 bytes_retransmit=27 bytes_invalid=0 send_seq=45569 receive_seq=45569 retransmit_seq=2 srtt=0.003 rttvar=0.000 rto=0.025 ready_bytes=56 upcoming_bytes=2705 freq=16000266 rpi: mcu_awake=0.000 mcu_task_avg=0.000007 mcu_task_stddev=0.000012 bytes_write=27926 bytes_read=88054 bytes_retransmit=0 bytes_invalid=0 send_seq=4623 receive_seq=4623 retransmit_seq=0 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 upcoming_bytes=0 freq=50000171 adj=49999318 sd_pos=142428 heater_bed: target=60 temp=59.9 pwm=0.182 sysload=0.12 cputime=145.000 memavail=3474044 print_time=4438.776 buffer_time=2.218 print_stall=0 extruder: target=220 temp=220.0 pwm=0.464
Timeout with MCU 'mcu' (eventtime=4461.903617)
Transition to shutdown state: Lost communication with MCU 'mcu'
Dumping gcode input 0 blocks
This is strange. Because there is a communication error, and only then a G1.
Sineos
April 21, 2025, 6:47pm
4
It looks like the initial error is
Timeout with MCU 'mcu' (eventtime=4461.903617)
Transition to shutdown state: Lost communication with MCU 'mcu'
and the other errors are just consequences. See Timeout with MCU / Lost communication with MCU . As a first attempt, I would try disconnecting the webcam.
1 Like
Okay. Will remove webcam and try to print “with no filament” as already wasted plenty due to almost 4 failed print.
I have tried after removing USB camera but still problem arises.
Klipper log attached, kindly someone guide me to resolve this problem.
klippy (2).zip (2.8 MB)
Would be nice to tell us what is was.
1 Like
Sineos
April 22, 2025, 9:08pm
8
It is the same error as above. Unfortunately, there is not much more guidance than what is already listed in the provided link. This error typically indicates some sort of hardware instability, and Klipper only recognizes that it occurred but cannot determine the cause.
Is this error occurred due to raspberry Pi hardware problem or mcu releted hardware problem??
I am planning to re flash pi and mcu with fresh setup. Let’s see what happened next.
Sineos
April 23, 2025, 6:03am
10
It’s hard to tell, but usually it involves the MCU. Generally, as described, Klipper no longer receives a heartbeat from the MCU.
Usually not a solution.
Sineos:
Usually not a solution.
does that means i have to replace MCU??
Sineos
April 23, 2025, 3:09pm
12
Well, before you do this, it might help reading the already posted link…
I tried to print small object which placed near right front corner and it works.
IF I tried to print big part of place part at right back corner it failed.
I suspect cable shorting may occur at far end.
Still experimenting.
Actions i have taken.
I tried 20 Amp Smps but still error Came.
I tried with three different usb cable but still error came.
I kept pi at far away. But still error came.
Use official power supply of Raspberry Pi but still error came.
I opened mcu box and check cable tightness of all connectors.
Then i have tried putting small part approx 10 cm x 10 Cm, placed at front right corner. And didn’t get error.
Again I tried big part and error Cam back .
My observation
Error came every time at second layer.
Print head postion is at right back side When error came
All three usb cable i have used are 5v,G,TX & rx connection. Disconnecting 5V of pi can help??
hcet14
April 27, 2025, 2:31pm
15
Interesting problem. Could you please post a fresh klippy.log?
Sineos
April 27, 2025, 3:13pm
16
It’s unlikely, but you can try. In any case, this seems to be a hardware instability issue. Unfortunately, diagnosing it can be quite tedious.
Problem persist after Disconnecting 5V.
Now three things are pending for checking.
Raspberry Pi itself.
MCU board.
Whole power wiring harness.
Will updating each steps.
hcet14
April 27, 2025, 5:19pm
18
Why is the MCU load suddently increasing?
Did you have running Klipper version v0.13.0 before the error occured?
klippy_graph.pdf (429.4 KB)
currently its :- FIRMWARE_VERSION:v0.13.0-51-gbfda326c2
problem started approx. 7 days back after I have updated klipper. unfortunately I don’t remember which version its running before update.
currently i have re-flash raspberry pi with latest image of klipper and upload latest firmware on MCU.
Todays Log is attached.
bkp_270420252254.zip (518.8 KB)
i have write test G-code file which runs only x and y axis with max. speed my machine can handle to verify when MCU disconnected. and surprisingly every time MCU disconnected the position of nozzle is at far end of x axis. as per below image. and everty time MCU communication failed i observe nozzle at this place.
G-Code file :
Check Gcode.gcode (16.9 KB)
hcet14
April 27, 2025, 5:54pm
20
Do you still use your webcam?