# TMC Reset / G1 Error

**URL:** <https://klipper.discourse.group/t/tmc-reset-g1-error/12522>\
**Category:** General Discussion\
**Created:** [December 22, 2023, 5:20pm UTC](https://klipper.discourse.group/t/tmc-reset-g1-error/12522 "2023-12-22T17:20:19Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stetinac](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/stetinac/32/8854_2.png) [@Stetinac](https://klipper.discourse.group/u/Stetinac)\
**Post date:** [December 22, 2023, 5:20pm UTC](https://klipper.discourse.group/t/tmc-reset-g1-error/12522/1 "2023-12-22T17:20:19Z")

</div>

Replace Y step motor solve Your problem?

I have a similar problem. After turning on Preasure Advance printer stopped directly after the purge line during the move to the first line of the print. Print crashe with “Internal error on command G1”

In klippy.log i found these errors:

> TMC ‘extruder’ reports GSTAT: 00000001 reset=1(Reset)  
> TMC ‘extruder’ reports GSTAT: 00000000

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [December 22, 2023, 5:50pm UTC](https://klipper.discourse.group/t/tmc-reset-g1-error/12522/2 "2023-12-22T17:50:36Z")

</div>

Moved to a new thread since most likely unrelated.

> [@Stetinac](#):
>
> TMC ‘extruder’ reports GSTAT: 00000001 reset=1(Reset)  
> TMC ‘extruder’ reports GSTAT: 00000000

These are no errors but either the power up sequence or something that “healed” itself immediately.

Post your klippy.log

---

<div class="post-metadata">

**Author:** ![Stetinac](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/stetinac/32/8854_2.png) [@Stetinac](https://klipper.discourse.group/u/Stetinac)\
**Post date:** [December 22, 2023, 5:55pm UTC](https://klipper.discourse.group/t/tmc-reset-g1-error/12522/3 "2023-12-22T17:55:16Z")

</div>

[klippy.log](https://klipper.discourse.group/uploads/short-url/spVmhOTR8pghKVye2Cm2exg5XsZ.log) (338.7 KB)

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [December 22, 2023, 6:00pm UTC](https://klipper.discourse.group/t/tmc-reset-g1-error/12522/4 "2023-12-22T18:00:01Z")

</div>

Interesting.  
Stepcompress errors **without** any preceding errors are quite rare.

Can you reproduce it? If yes, run a M112 immediately after the error and post the resulting log, please.

---

<div class="post-metadata">

**Author:** ![Stetinac](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/stetinac/32/8854_2.png) [@Stetinac](https://klipper.discourse.group/u/Stetinac)\
**Post date:** [December 22, 2023, 6:33pm UTC](https://klipper.discourse.group/t/tmc-reset-g1-error/12522/5 "2023-12-22T18:33:58Z")

</div>

I can reproduce it in every print whit Preasure Advance is set. Without PA everything is ok.

Attached log include M112 immediately after firmware restart. Error shutdown firmware

[klippy\_with\_M112.log](https://klipper.discourse.group/uploads/short-url/6dFQc92PVDtMQNBtvanUQzOcaja.log) (602.7 KB)

---

<div class="post-metadata">

**Author:** ![Stetinac](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/stetinac/32/8854_2.png) [@Stetinac](https://klipper.discourse.group/u/Stetinac)\
**Post date:** [December 22, 2023, 8:43pm UTC](https://klipper.discourse.group/t/tmc-reset-g1-error/12522/6 "2023-12-22T20:43:57Z")

</div>

@Sineos I do some tests and now I know what causes the G1 error, I think.

The problem is the combination of the PA and the pause at the end of my purge line at the end of the start script. If I set the PA, Klipper waits 2000ms after the purge line and raises an error G1. If I remove the “pause” line from the startup script, everythink is ok.

I have been using this startup script for about half a year and the printer is failing only now.

---

<div class="post-metadata">

**Author:** ![koconnor](https://avatars.discourse-cdn.com/v4/letter/k/aca169/32.png) [@koconnor](https://klipper.discourse.group/u/koconnor)\
**Post date:** [December 23, 2023, 4:02am UTC](https://klipper.discourse.group/t/tmc-reset-g1-error/12522/7 "2023-12-23T04:02:40Z")

</div>

That’s odd. Can you attach the g-code file that causes the failure here?

-Kevin

---

<div class="post-metadata">

**Author:** ![Stetinac](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/stetinac/32/8854_2.png) [@Stetinac](https://klipper.discourse.group/u/Stetinac)\
**Post date:** [December 23, 2023, 1:17pm UTC](https://klipper.discourse.group/t/tmc-reset-g1-error/12522/8 "2023-12-23T13:17:38Z")

</div>

Attached…

```auto
# My startup sckript
> [gcode_macro START_PRINT]
gcode:
  RESPOND TYPE=echo MSG='Startujeme!' 
  {% set BED_TEMP = params.BED_TEMP|default(60)|float %}
  {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(210)|float %}
  {% if not printer['output_pin mainpower'].value|int %}
    SET_PIN PIN=mainpower VALUE=1
    RESPOND TYPE=echo MSG='Zapinam tiskarnu!' 
  {% else %}
    RESPOND TYPE=echo MSG='Tiskarna je zapnuta!' 
  {% endif %}
  RESPOND TYPE=echo MSG='Aktualni teplota hot bedu: {printer.heater_bed.temperature}' 
  RESPOND TYPE=echo MSG='Aktualni teplota hot endu: {printer.extruder.temperature}'
  {% if printer.extruder.temperature < 150 %}
    RESPOND TYPE=echo MSG='Nastavuji extruder na 150 stupnu'
    M104 S150
  {% else %}
    RESPOND TYPE=echo MSG='Teplota hot endu je vyssi jak 150 stupnu, pokracuji dal ve spousteni tisku'
    M104 S{printer.extruder.temperature}
  {% endif %}
  M190 S{BED_TEMP}
  G90
  M83
  G28
  G29
  G1 X3 Y6 Z5 F5000
  G1 Z5 F3000
  M109 S{EXTRUDER_TEMP}
  G1 Z0.3 F300
  G92 E0
  G1 E2 F3000
  G1 X120 E30 F600
  G1 X140 F5000
  G92 E0
  G1 E-0.2 F600
  G92 E0
> G4 P2000 # After this line, Klipper crashed if PA is set

```

[sample\_gcode\_with\_PA.gcode](https://klipper.discourse.group/uploads/short-url/6uSdKHQxEQBXlARCMRfcfrFMvIQ.gcode) (20.5 KB)

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [December 23, 2023, 2:11pm UTC](https://klipper.discourse.group/t/tmc-reset-g1-error/12522/9 "2023-12-23T14:11:39Z")

</div>

Have you tried a `M400` just before the `G4 P2000` ?

[https://reprap.org/wiki/G-code#M400:\_Wait\_for\_current\_moves\_to\_finish](https://reprap.org/wiki/G-code#M400:_Wait_for_current_moves_to_finish)

---

<div class="post-metadata">

**Author:** ![Stetinac](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/stetinac/32/8854_2.png) [@Stetinac](https://klipper.discourse.group/u/Stetinac)\
**Post date:** [December 23, 2023, 5:35pm UTC](https://klipper.discourse.group/t/tmc-reset-g1-error/12522/10 "2023-12-23T17:35:12Z")

</div>

I haven’t tried it. I don’t need it…  
If I need it, I’ll try the M400.

Thx for help

---

<div class="post-metadata">

**Author:** ![koconnor](https://avatars.discourse-cdn.com/v4/letter/k/aca169/32.png) [@koconnor](https://klipper.discourse.group/u/koconnor)\
**Post date:** [December 23, 2023, 8:12pm UTC](https://klipper.discourse.group/t/tmc-reset-g1-error/12522/11 "2023-12-23T20:12:27Z")

</div>

Thanks. I am able to reproduce this problem locally. This appears to be a regression introduced in the recent toolhead flush rework (for `pwm_tool`). The regression is introduced in commit c491ea66.

I will try to track down the root cause and a fix.

-Kevin

---

<div class="post-metadata">

**Author:** ![koconnor](https://avatars.discourse-cdn.com/v4/letter/k/aca169/32.png) [@koconnor](https://klipper.discourse.group/u/koconnor)\
**Post date:** [December 26, 2023, 4:39pm UTC](https://klipper.discourse.group/t/tmc-reset-g1-error/12522/12 "2023-12-26T16:39:01Z")

</div>

This should hopefully be fixed now (commit fe56bf36).

-Kevin

---

<div class="post-metadata">

**Author:** ![Stetinac](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/stetinac/32/8854_2.png) [@Stetinac](https://klipper.discourse.group/u/Stetinac)\
**Post date:** [December 29, 2023, 1:46am UTC](https://klipper.discourse.group/t/tmc-reset-g1-error/12522/13 "2023-12-29T01:46:04Z")

</div>

Everything works - problem solved 🙂

Thank You Kevin

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/klipper/original/1X/64419bf2aac6639e6ef5cef200dcd456b0a01ac3.png) [@system](https://klipper.discourse.group/u/system)\
**Post date:** [January 28, 2024, 11:46am UTC](https://klipper.discourse.group/t/tmc-reset-g1-error/12522/14 "2024-01-28T11:46:48Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
