# SKR Pro + TMC 2209 UART

**URL:** <https://klipper.discourse.group/t/skr-pro-tmc-2209-uart/3605>\
**Category:** General Discussion\
**Created:** [July 28, 2022, 9:00am UTC](https://klipper.discourse.group/t/skr-pro-tmc-2209-uart/3605 "2022-07-28T09:00:16Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![yvautrin](https://avatars.discourse-cdn.com/v4/letter/y/d07c76/32.png) [@yvautrin](https://klipper.discourse.group/u/yvautrin)\
**Post date:** [July 28, 2022, 9:00am UTC](https://klipper.discourse.group/t/skr-pro-tmc-2209-uart/3605/1 "2022-07-28T09:00:16Z")

</div>

Still struggling with my setup for the Hypercube…  
As mentionned in the SKR Pro manual, I have shorten the stallguard pin on the steppers, now I am struggling with the printer.cfg… The only things working are the fans, the heaters and the webcam…No way to move the steppers in any direction…

Help appreciated!

#This is the printer.cfg file for my Hypercube Evolution  
#Bed Size 300x300x350  
#TMC 2209 steppers in UART mode  
#Stallguard pin removed  
#SKR Pro V 1.1

# Klipper/Moonraker/Mainsail installed with KIAUH script on Raspberry Pi 4

#Yann Vautrin 2022

[stepper\_x]  
step\_pin: PE9  
dir\_pin: PF1  
enable\_pin: !PF2  
microsteps: 16  
rotation\_distance: 40  
endstop\_pin: PB10  
position\_endstop: 0  
position\_max: 200  
homing\_speed: 50

[tmc2209 stepper\_x]  
uart\_pin: PC13  
run\_current: 0.8  
hold\_current: 0.5  
stealthchop\_threshold: 80  
diag\_pin: PB10

[stepper\_y]  
step\_pin: PE11  
dir\_pin: PE8  
enable\_pin: !PD7  
microsteps: 16  
rotation\_distance: 40  
endstop\_pin: PE12  
position\_endstop: 0  
position\_max: 200  
homing\_speed: 50

[tmc2209 stepper\_y]  
uart\_pin: PE3  
interpolate: True  
run\_current: 0.8  
hold\_current: 0.5  
stealthchop\_threshold: 80  
diag\_pin: PE12

[stepper\_z]  
step\_pin: PE13  
dir\_pin: PC2  
enable\_pin: !PC0  
microsteps: 16  
rotation\_distance: 8  
endstop\_pin: PG8  
position\_endstop: 0.5  
position\_max: 200

[tmc2209 stepper\_z]  
uart\_pin: PE1  
run\_current: 0.8  
hold\_current: 0.5  
stealthchop\_threshold: 30  
diag\_pin: PG8

[extruder]  
step\_pin: PE14  
dir\_pin: PA0  
enable\_pin: !PC3  
microsteps: 16  
rotation\_distance: 33.500  
nozzle\_diameter: 0.400  
filament\_diameter: 1.750  
heater\_pin: PB1  
sensor\_pin: PF4  
sensor\_type: EPCOS 100K B57560G104F  
control: pid  
pid\_Kp: 22.2  
pid\_Ki: 1.08  
pid\_Kd: 114  
min\_temp: 0  
max\_temp: 170

[tmc2209 extruder]  
uart\_pin: PD1  
run\_current: 0.8  
stealthchop\_threshold: 5  
diag\_pin: PE15

[heater\_bed]  
heater\_pin: PD12  
sensor\_pin: PF3 # T0  
sensor\_type: ATC Semitec 104GT-2  
control: watermark  
min\_temp: 0  
max\_temp: 130

[fan]  
pin: PC8

[heater\_fan fan1]  
pin: PE5

#[heater\_fan fan2]  
#pin: PE6

[mcu]  
serial: /dev/serial/by-id/usb-Klipper\_stm32f407xx\_2E00290003504D4E48333620-if00

[printer]  
kinematics: corexy  
max\_velocity: 300  
max\_accel: 3000  
max\_z\_velocity: 25  
max\_z\_accel: 30

[virtual\_sdcard]  
path: ~/gcode\_files

[display\_status]

[pause\_resume]

[gcode\_macro PAUSE]  
description: Pause the actual running print  
rename\_existing: PAUSE\_BASE  
gcode:  
PAUSE\_BASE  
\_TOOLHEAD\_PARK\_PAUSE\_CANCEL

[gcode\_macro RESUME]  
description: Resume the actual running print  
rename\_existing: RESUME\_BASE  
gcode:

##### read extrude from \_TOOLHEAD\_PARK\_PAUSE\_CANCEL macro

{% set extrude = printer[‘gcode\_macro \_TOOLHEAD\_PARK\_PAUSE\_CANCEL’].extrude %}

#### get VELOCITY parameter if specified

{% if ‘VELOCITY’ in params|upper %}  
{% set get\_params = (‘VELOCITY=’ + params.VELOCITY) %}  
{%else %}  
{% set get\_params = “” %}  
{% endif %}

##### end of definitions

{% if printer.extruder.can\_extrude|lower == ‘true’ %}  
M83  
G1 E{extrude} F2100  
{% if printer.gcode\_move.absolute\_extrude |lower == ‘true’ %} M82 {% endif %}  
{% else %}  
{action\_respond\_info(“Extruder not hot enough”)}  
{% endif %}  
RESUME\_BASE {get\_params}

[gcode\_macro CANCEL\_PRINT]  
description: Cancel the actual running print  
rename\_existing: CANCEL\_PRINT\_BASE  
variable\_park: True  
gcode:

## Move head and retract only if not already in the pause state and park set to true

{% if printer.pause\_resume.is\_paused|lower == ‘false’ and park|lower == ‘true’%}  
\_TOOLHEAD\_PARK\_PAUSE\_CANCEL  
{% endif %}  
TURN\_OFF\_HEATERS  
CANCEL\_PRINT\_BASE

[gcode\_macro \_TOOLHEAD\_PARK\_PAUSE\_CANCEL]  
description: Helper: park toolhead used in PAUSE and CANCEL\_PRINT  
variable\_extrude: 1.0  
gcode:

##### set park positon for x and y

# default is your max posion from your printer.cfg

{% set x\_park = printer.toolhead.axis\_maximum.x|float - 5.0 %}  
{% set y\_park = printer.toolhead.axis\_maximum.y|float - 5.0 %}  
{% set z\_park\_delta = 2.0 %}

##### calculate save lift position

{% set max\_z = printer.toolhead.axis\_maximum.z|float %}  
{% set act\_z = printer.toolhead.position.z|float %}  
{% if act\_z \< (max\_z - z\_park\_delta) %}  
{% set z\_safe = z\_park\_delta %}  
{% else %}  
{% set z\_safe = max\_z - act\_z %}  
{% endif %}

##### end of definitions

{% if printer.extruder.can\_extrude|lower == ‘true’ %}  
M83  
G1 E-{extrude} F2100  
{% if printer.gcode\_move.absolute\_extrude |lower == ‘true’ %} M82 {% endif %}  
{% else %}  
{action\_respond\_info(“Extruder not hot enough”)}  
{% endif %}  
{% if “xyz” in printer.toolhead.homed\_axes %}  
G91  
G1 Z{z\_safe} F900  
G90  
G1 X{x\_park} Y{y\_park} F6000  
{% if printer.gcode\_move.absolute\_coordinates|lower == ‘false’ %} G91 {% endif %}  
{% else %}  
{action\_respond\_info(“Printer not homed”)}  
{% endif %}

---

<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:** [July 28, 2022, 12:47pm UTC](https://klipper.discourse.group/t/skr-pro-tmc-2209-uart/3605/2 "2022-07-28T12:47:34Z")

</div>

> [@yvautrin](#):
>
> [tmc2209 stepper\_x]

This section misses this line:

> [@yvautrin](#):
>
> interpolate: True

You also may set the pullup resistor for the diag\_pin, a driver\_SGTHRS value and the other parameters as described here

[https://www.klipper3d.org/TMC\_Drivers.html](https://www.klipper3d.org/TMC_Drivers.html)

> [@](#):
>
> It is necessary to configure the sensorless homing pins and to configure initial “stallguard” settings. A tmc2209 example configuration for an X axis might look like:
> 
> ```auto
> [tmc2209 stepper_x]
> diag_pin: ^PA1 # Set to MCU pin connected to TMC DIAG pin
> driver_SGTHRS: 255 # 255 is most sensitive value, 0 is least sensitive
> ...
> 
> [stepper_x]
> endstop_pin: tmc2209_stepper_x:virtual_endstop
> homing_retract_dist: 0
> ...
> 
> ```

---

<div class="post-metadata">

**Author:** ![yvautrin](https://avatars.discourse-cdn.com/v4/letter/y/d07c76/32.png) [@yvautrin](https://klipper.discourse.group/u/yvautrin)\
**Post date:** [July 28, 2022, 2:02pm UTC](https://klipper.discourse.group/t/skr-pro-tmc-2209-uart/3605/3 "2022-07-28T14:02:07Z")

</div>

Thanks for that! I did some changes in the printer.cfg, and now I have X and Y working smoothly!  
But when I try to move or Home Z… I got this error message:

Unable to read tmc uart ‘stepper\_z’ register IFCNT  
Once the underlying issue is corrected, use the  
“FIRMWARE\_RESTART” command to reset the firmware, reload the  
config, and restart the host software.  
Printer is shutdown

Here is the new printer.cfg:

#This is the printer.cfg file for my Hypercube Evolution  
#Bed Size 300x300x350  
#TMC 2209 steppers in UART mode  
#SKR Pro V 1.1  
#Klipper/Moonraker/Mainsail installed with KIAUH script on Raspberry Pi 4  
#Yann Vautrin 2022

[stepper\_x]  
step\_pin: PE9  
dir\_pin: PF1  
enable\_pin: !PF2  
microsteps: 16  
rotation\_distance: 40  
endstop\_pin: tmc2209\_stepper\_x:virtual\_endstop  
homing\_retract\_dist: 0  
position\_endstop: 0  
position\_max: 200  
homing\_speed: 50

[tmc2209 stepper\_x]  
uart\_pin: PC13  
interpolate: True  
run\_current: 0.8  
hold\_current: 0.5  
stealthchop\_threshold: 80  
diag\_pin: ^PB10 # Set to MCU pin connected to TMC DIAG pin  
driver\_SGTHRS: 255 # 255 is most sensitive value, 0 is least sensitive

[stepper\_y]  
step\_pin: PE11  
dir\_pin: PE8  
enable\_pin: !PD7  
microsteps: 16  
rotation\_distance: 40  
endstop\_pin: tmc2209\_stepper\_y:virtual\_endstop  
homing\_retract\_dist: 0  
position\_endstop: 0  
position\_max: 200  
homing\_speed: 50

[tmc2209 stepper\_y]  
uart\_pin: PE3  
interpolate: True  
run\_current: 0.8  
hold\_current: 0.5  
stealthchop\_threshold: 80  
diag\_pin: ^PE12 # Set to MCU pin connected to TMC DIAG pin  
driver\_SGTHRS: 255 # 255 is most sensitive value, 0 is least sensitive

[stepper\_z]  
step\_pin: PE13  
dir\_pin: PC2  
enable\_pin: !PC0  
microsteps: 16  
rotation\_distance: 8  
endstop\_pin: PG8  
position\_endstop: 0.5  
position\_max: 200

[tmc2209 stepper\_z]  
uart\_pin: PE1  
interpolate: True  
run\_current: 0.8  
hold\_current: 0.5  
stealthchop\_threshold: 30  
diag\_pin: ^PG8 # Set to MCU pin connected to TMC DIAG pin  
driver\_SGTHRS: 255 # 255 is most sensitive value, 0 is least sensitive

[extruder]  
step\_pin: PE14  
dir\_pin: PA0  
enable\_pin: !PC3  
microsteps: 16  
rotation\_distance: 33.500  
nozzle\_diameter: 0.400  
filament\_diameter: 1.750  
heater\_pin: PB1  
sensor\_pin: PF4  
sensor\_type: EPCOS 100K B57560G104F  
control: pid  
pid\_Kp: 22.2  
pid\_Ki: 1.08  
pid\_Kd: 114  
min\_temp: 0  
max\_temp: 170

[tmc2209 extruder]  
uart\_pin: PD1  
run\_current: 0.8  
stealthchop\_threshold: 5  
diag\_pin: ^E15 # Set to MCU pin connected to TMC DIAG pin  
driver\_SGTHRS: 255 # 255 is most sensitive value, 0 is least sensitive

[heater\_bed]  
heater\_pin: PD12  
sensor\_pin: PF3 # T0  
sensor\_type: ATC Semitec 104GT-2  
control: watermark  
min\_temp: 0  
max\_temp: 130

[fan]  
pin: PC8

[heater\_fan fan1]  
pin: PE5

#[heater\_fan fan2]  
#pin: PE6

[mcu]  
serial: /dev/serial/by-id/usb-Klipper\_stm32f407xx\_2E00290003504D4E48333620-if00

[printer]  
kinematics: corexy  
max\_velocity: 300  
max\_accel: 3000  
max\_z\_velocity: 25  
max\_z\_accel: 30

[virtual\_sdcard]  
path: ~/gcode\_files

[display\_status]

[pause\_resume]

[gcode\_macro PAUSE]  
description: Pause the actual running print  
rename\_existing: PAUSE\_BASE  
gcode:  
PAUSE\_BASE  
\_TOOLHEAD\_PARK\_PAUSE\_CANCEL

[gcode\_macro RESUME]  
description: Resume the actual running print  
rename\_existing: RESUME\_BASE  
gcode:

##### read extrude from \_TOOLHEAD\_PARK\_PAUSE\_CANCEL macro

{% set extrude = printer[‘gcode\_macro \_TOOLHEAD\_PARK\_PAUSE\_CANCEL’].extrude %}

#### get VELOCITY parameter if specified

{% if ‘VELOCITY’ in params|upper %}  
{% set get\_params = (‘VELOCITY=’ + params.VELOCITY) %}  
{%else %}  
{% set get\_params = “” %}  
{% endif %}

##### end of definitions

{% if printer.extruder.can\_extrude|lower == ‘true’ %}  
M83  
G1 E{extrude} F2100  
{% if printer.gcode\_move.absolute\_extrude |lower == ‘true’ %} M82 {% endif %}  
{% else %}  
{action\_respond\_info(“Extruder not hot enough”)}  
{% endif %}  
RESUME\_BASE {get\_params}

[gcode\_macro CANCEL\_PRINT]  
description: Cancel the actual running print  
rename\_existing: CANCEL\_PRINT\_BASE  
variable\_park: True  
gcode:

## Move head and retract only if not already in the pause state and park set to true

{% if printer.pause\_resume.is\_paused|lower == ‘false’ and park|lower == ‘true’%}  
\_TOOLHEAD\_PARK\_PAUSE\_CANCEL  
{% endif %}  
TURN\_OFF\_HEATERS  
CANCEL\_PRINT\_BASE

[gcode\_macro \_TOOLHEAD\_PARK\_PAUSE\_CANCEL]  
description: Helper: park toolhead used in PAUSE and CANCEL\_PRINT  
variable\_extrude: 1.0  
gcode:

##### set park positon for x and y

# default is your max posion from your printer.cfg

{% set x\_park = printer.toolhead.axis\_maximum.x|float - 5.0 %}  
{% set y\_park = printer.toolhead.axis\_maximum.y|float - 5.0 %}  
{% set z\_park\_delta = 2.0 %}

##### calculate save lift position

{% set max\_z = printer.toolhead.axis\_maximum.z|float %}  
{% set act\_z = printer.toolhead.position.z|float %}  
{% if act\_z \< (max\_z - z\_park\_delta) %}  
{% set z\_safe = z\_park\_delta %}  
{% else %}  
{% set z\_safe = max\_z - act\_z %}  
{% endif %}

##### end of definitions

{% if printer.extruder.can\_extrude|lower == ‘true’ %}  
M83  
G1 E-{extrude} F2100  
{% if printer.gcode\_move.absolute\_extrude |lower == ‘true’ %} M82 {% endif %}  
{% else %}  
{action\_respond\_info(“Extruder not hot enough”)}  
{% endif %}  
{% if “xyz” in printer.toolhead.homed\_axes %}  
G91  
G1 Z{z\_safe} F900  
G90  
G1 X{x\_park} Y{y\_park} F6000  
{% if printer.gcode\_move.absolute\_coordinates|lower == ‘false’ %} G91 {% endif %}  
{% else %}  
{action\_respond\_info(“Printer not homed”)}  
{% endif %}

---

<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:** [July 28, 2022, 2:31pm UTC](https://klipper.discourse.group/t/skr-pro-tmc-2209-uart/3605/4 "2022-07-28T14:31:53Z")

</div>

If you have a regular endstop (at PG8) for the Z-axes, you don’t need the sensorless homing stuff for that axes. (diag\_pin and driver\_SGTHRS)

The same is for the extruder, as there is no endstop at all.

You have to undo the stallguard short as well.

---

<div class="post-metadata">

**Author:** ![yvautrin](https://avatars.discourse-cdn.com/v4/letter/y/d07c76/32.png) [@yvautrin](https://klipper.discourse.group/u/yvautrin)\
**Post date:** [July 28, 2022, 3:02pm UTC](https://klipper.discourse.group/t/skr-pro-tmc-2209-uart/3605/5 "2022-07-28T15:02:55Z")

</div>

stallguard short was already removed, I did the following modification to Z and extr.

I just removed all the physical/optical endstops

But Z still doesn’t move… when trying to home, I got a warning sign in the coordinates box, and it reads “Z 300.000”…

PS: I am on a double Z if it changes something…

---

<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:** [July 28, 2022, 3:12pm UTC](https://klipper.discourse.group/t/skr-pro-tmc-2209-uart/3605/6 "2022-07-28T15:12:09Z")

</div>

You can type M119 into the command line and you will get the status of the endstops.  
This will show if the endstops are open or closed.  
You may have to invert the endstop input pin of the Z-axes by putting a `!` in front of the pin name e.g.: `!PG8`

---

<div class="post-metadata">

**Author:** ![yvautrin](https://avatars.discourse-cdn.com/v4/letter/y/d07c76/32.png) [@yvautrin](https://klipper.discourse.group/u/yvautrin)\
**Post date:** [July 28, 2022, 3:30pm UTC](https://klipper.discourse.group/t/skr-pro-tmc-2209-uart/3605/7 "2022-07-28T15:30:34Z")

</div>

New part for the Z stepper:

```auto
[stepper_z]
step_pin: PE13
dir_pin: PC2
enable_pin: !PC0
microsteps: 16
rotation_distance: 8
endstop_pin: !PG8
position_endstop: 0
position_max: 200
homing_speed: 10

[tmc2209 stepper_z]
uart_pin: PE1
interpolate: True
run_current: 0.8
hold_current: 0.5
stealthchop_threshold: 30
diag_pin: ^PG8 # Set to MCU pin connected to TMC DIAG pin
driver_SGTHRS: 100 # 255 is most sensitive value, 0 is least sensitive

```

M119 :

```auto
17:27:20
x:open y:open z:open

```

Now, when Homing Z…Shutdown…  
Error message:

Unable to read tmc uart ‘stepper\_z’ register IFCNT

and the hotend fan starts and run full power… 🥴

---

<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:** [July 28, 2022, 3:53pm UTC](https://klipper.discourse.group/t/skr-pro-tmc-2209-uart/3605/8 "2022-07-28T15:53:20Z")

</div>

You have this:

> [@yvautrin](#):
>
> `endstop_pin: !PG8`

and this:

> [@yvautrin](#):
>
> `diag_pin: ^PG8 `

You may delete the last two lines in `[tmc2209 stepper_z]`

The full power hotend fan is a safety feature that kicks in when in emergency mode, like an error.

---

<div class="post-metadata">

**Author:** ![yvautrin](https://avatars.discourse-cdn.com/v4/letter/y/d07c76/32.png) [@yvautrin](https://klipper.discourse.group/u/yvautrin)\
**Post date:** [July 28, 2022, 3:59pm UTC](https://klipper.discourse.group/t/skr-pro-tmc-2209-uart/3605/9 "2022-07-28T15:59:45Z")

</div>

printer.cfg modified as this:

```auto
[stepper_z]
step_pin: PE13
dir_pin: PC2
enable_pin: !PC0
microsteps: 16
rotation_distance: 8
endstop_pin: !PG8
position_endstop: 0
position_max: 200
homing_speed: 10

[tmc2209 stepper_z]
uart_pin: PE1
interpolate: True
run_current: 0.8
hold_current: 0.5
stealthchop_threshold: 30

```

Still not movement on Z…and same error message…

PS: Thanks a lot for you time and help! 🙌

---

<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:** [July 28, 2022, 4:05pm UTC](https://klipper.discourse.group/t/skr-pro-tmc-2209-uart/3605/10 "2022-07-28T16:05:55Z")

</div>

Are these steppers on small boards?  
If yes, you may swap that one for Z with the extruder stepper.  
Also check the cables.

Be sure you turned of the printer before. And maybe also the USB because of backpowering from the Pi.

---

<div class="post-metadata">

**Author:** ![yvautrin](https://avatars.discourse-cdn.com/v4/letter/y/d07c76/32.png) [@yvautrin](https://klipper.discourse.group/u/yvautrin)\
**Post date:** [July 28, 2022, 4:24pm UTC](https://klipper.discourse.group/t/skr-pro-tmc-2209-uart/3605/11 "2022-07-28T16:24:45Z")

</div>

I swapped the X and Y steppers with the Z’s, now Z is working but no X nor Y…

they are the TMC2209 V1.2 from BTT, on small boards, I can see a smell potentiometer on the top right of each of them… any adjustments are required… or are they just dead? (They are straight out of the box!)…

---

<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:** [July 28, 2022, 4:34pm UTC](https://klipper.discourse.group/t/skr-pro-tmc-2209-uart/3605/12 "2022-07-28T16:34:14Z")

</div>

If X/Y work on the Z axes and the former Z stepper do not work on the X/Y axes, then you can assume that the steppers are broken. - Sorry -

The potentiometers are for setting the motor current when in stand alone mode

---

<div class="post-metadata">

**Author:** ![yvautrin](https://avatars.discourse-cdn.com/v4/letter/y/d07c76/32.png) [@yvautrin](https://klipper.discourse.group/u/yvautrin)\
**Post date:** [July 28, 2022, 4:37pm UTC](https://klipper.discourse.group/t/skr-pro-tmc-2209-uart/3605/13 "2022-07-28T16:37:20Z")

</div>

🥴  
Thanks a lot, will get some new steppers then…

---

<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:** [November 4, 2025, 2:32pm UTC](https://klipper.discourse.group/t/skr-pro-tmc-2209-uart/3605/14 "2025-11-04T14:32:55Z")

</div>


