# Tmc2208 setting for extruder\_stepper

**URL:** <https://klipper.discourse.group/t/tmc2208-setting-for-extruder-stepper/3991>\
**Category:** General Discussion\
**Created:** [August 29, 2022, 3:52pm UTC](https://klipper.discourse.group/t/tmc2208-setting-for-extruder-stepper/3991 "2022-08-29T15:52:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tphan](https://avatars.discourse-cdn.com/v4/letter/t/ac8455/32.png) [@tphan](https://klipper.discourse.group/u/tphan)\
**Post date:** [August 29, 2022, 3:52pm UTC](https://klipper.discourse.group/t/tmc2208-setting-for-extruder-stepper/3991/1 "2022-08-29T15:52:18Z")

</div>

I am setting up a extruder\_stepper as below but was unable to asigned it to the tmc2208. did i do a wrong syntax or the extruder\_stepper does not have a specific setting.  
extruder\_stepper share\_stepper]  
extruder:  
step\_pin: PF3  
dir\_pin: !PG3  
enable\_pin: !PF8  
microsteps: 16  
rotation\_distance:15.84  
gear\_ratio: 5:1

[tmc2208 share\_stepper]  
uart\_pin: PG4  
run\_current: 0.650  
stealthchop\_threshold: 999999

Getting error:  
===== Config file =====  
[stepper\_x]  
step\_pin = PC15  
dir\_pin = PF0  
enable\_pin = !PF1  
microsteps = 16  
rotation\_distance = 40  
endstop\_pin = ^!PF2  
position\_endstop = 0  
position\_max = 500  
homing\_speed = 50

[stepper\_y]  
step\_pin = PE3  
dir\_pin = PE2  
enable\_pin = !PE4  
microsteps = 16  
rotation\_distance = 40  
endstop\_pin = ^!PC13  
position\_endstop = 0  
position\_max = 500  
homing\_speed = 50

[stepper\_z]  
step\_pin = PB8  
dir\_pin = PB7  
enable\_pin = !PB9  
microsteps = 16  
rotation\_distance = 8  
endstop\_pin = ^!PE0  
position\_endstop = 0  
position\_max = 500  
homing\_speed = 12  
second\_homing\_speed = 1

[stepper\_z1]  
step\_pin = PG12  
dir\_pin = PG11  
enable\_pin = !PG13  
microsteps = 16  
rotation\_distance = 8  
endstop\_pin = ^!PH6

[stepper\_z2]  
step\_pin = PD6  
dir\_pin = PD5  
enable\_pin = !PD7  
microsteps = 16  
rotation\_distance = 8  
endstop\_pin = ^!PG14

[stepper\_z3]  
step\_pin = PD1  
dir\_pin = PD0  
enable\_pin = !PD2  
microsteps = 4  
rotation\_distance = 8  
endstop\_pin = ^!PG9

[extruder\_stepper share\_stepper]  
extruder =  
step\_pin = PF3  
dir\_pin = !PG3  
enable\_pin = !PF8  
microsteps = 16  
rotation\_distance = 15.84  
gear\_ratio = 5:1

[extruder]  
nozzle\_diameter = 0.400  
filament\_diameter = 1.750  
heater\_pin = PB1  
sensor\_pin = PC1  
sensor\_type = EPCOS 100K B57560G104F  
min\_temp = 0  
max\_temp = 290  
min\_extrude\_temp = 10  
max\_extrude\_only\_distance = 500000  
control = pid  
pid\_kp = 18.622  
pid\_ki = 0.479  
pid\_kd = 180.863

[extruder1]  
nozzle\_diameter = 0.400  
filament\_diameter = 1.750  
heater\_pin = PA1  
sensor\_pin = PC2  
sensor\_type = EPCOS 100K B57560G104F  
control = pid  
pid\_kp = 22.2  
pid\_ki = 1.08  
pid\_kd = 114  
min\_temp = 0  
max\_temp = 290  
min\_extrude\_temp = 10  
max\_extrude\_only\_distance = 50000

[heater\_bed]  
heater\_pin = PA2  
sensor\_pin = PC0  
sensor\_type = ATC Semitec 104GT-2  
control = watermark  
min\_temp = 0  
max\_temp = 130

[fan]  
pin = PE5

[heater\_fan fan1]  
pin = PE6

[temperature\_sensor mcu\_temp]  
sensor\_type = temperature\_mcu

[mcu]  
restart\_method = command  
serial = dev/serial/by-id/usb-Klipper\_stm32f407xx\_2D0039000647303036313935-if00  
baud = 250000

[printer]  
kinematics = corexy  
max\_velocity = 10000  
max\_accel = 3000  
max\_z\_velocity = 25  
max\_z\_accel = 30

[servo Test\_servo]  
pin = PB11  
maximum\_servo\_angle = 180  
minimum\_pulse\_width = 0.0005  
maximum\_pulse\_width = 0.0025  
initial\_angle = 160

[probe]  
pin = ^!PH11  
deactivate\_on\_each\_sample = True  
x\_offset = 0.0  
y\_offset = 0.0  
z\_offset = 2  
speed = 5.0  
samples = 2  
sample\_retract\_dist = 2.0  
lift\_speed = 10  
samples\_tolerance = 0.100  
samples\_tolerance\_retries = 5  
activate\_gcode = SET\_SERVO SERVO=Test\_servo ANGLE=160  
deactivate\_gcode = SET\_SERVO SERVO=Test\_servo ANGLE=0

[tmc2208 stepper\_z]  
uart\_pin = PB5  
run\_current = 0.650  
stealthchop\_threshold = 999999

[tmc2208 stepper\_z1]  
uart\_pin = PG10  
run\_current = 0.650  
stealthchop\_threshold = 999999

[tmc2208 stepper\_z2]  
uart\_pin = PD4  
run\_current = 0.650  
stealthchop\_threshold = 999999

[tmc2208 stepper\_z3]  
uart\_pin = PC12  
run\_current = 0.650  
stealthchop\_threshold = 999999

[tmc2208 share\_stepper]  
uart\_pin = PC12  
run\_current = 0.650  
stealthchop\_threshold = 999999

[tmc5160 stepper\_x]  
cs\_pin = PC14  
sense\_resistor = 0.075  
run\_current = 1  
stealthchop\_threshold = 0  
spi\_software\_mosi\_pin = PG15  
spi\_software\_miso\_pin = PB6  
spi\_software\_sclk\_pin = PB3

[tmc5160 stepper\_y]  
cs\_pin = PE1  
sense\_resistor = 0.075  
run\_current = 1  
stealthchop\_threshold = 0  
spi\_software\_mosi\_pin = PG15  
spi\_software\_miso\_pin = PB6  
spi\_software\_sclk\_pin = PB3

[board\_pins]  
aliases =  
EXP1\_1=PC11, EXP1\_3=PC10, EXP1\_5=PG8, EXP1\_7=PG6, EXP1\_9=,  
EXP1\_2=PA15, EXP1\_4=PA8, EXP1\_6=PG7, EXP1\_8=PG5, EXP1\_10=\<5V\>,  
EXP2\_1=PB14, EXP2\_3=PD10, EXP2\_5=PH10, EXP2\_7=PB10, EXP2\_9=,  
EXP2\_2=PB13, EXP2\_4=PB12, EXP2\_6=PB15, EXP2\_8=, EXP2\_10=

[gcode\_macro T0]  
description = switch to T0  
gcode =  
ACTIVATE\_EXTRUDER EXTRUDER=extruder  
SYNC\_EXTRUDER\_MOTION EXTRUDER=share\_stepper MOTION\_QUEUE=extruder

[gcode\_macro T1]  
description = switch to T1  
gcode =  
ACTIVATE\_EXTRUDER EXTRUDER=extruder1  
SYNC\_EXTRUDER\_MOTION EXTRUDER=share\_stepper MOTION\_QUEUE=extruder1

# [gcode\_macro t\_offset] description = set gcode offset to current tool head gcode = SET\_GCODE\_OFFSET

Args: [‘/home/pi/klipper/klippy/klippy.py’, ‘/home/pi/printer.cfg’, ‘-l’, ‘/tmp/klippy.log’]  
Git version: ‘v0.10.0-546-ga709ba43’  
CPU: 4 core ARMv7 Processor rev 3 (v7l)  
Python: ‘2.7.16 (default, Oct 10 2019, 22:02:15) \n[GCC 8.3.0]’  
=============== Log rollover at Mon Aug 29 16:50:33 2022 ===============  
Shared TMC uarts need unique address or select\_pins polarity

Once the underlying issue is corrected, use the “RESTART”  
command to reload the config and restart the host software.  
Printer is halted

Shared TMC uarts need unique address or select\_pins polarity

Once the underlying issue is corrected, use the “RESTART”  
command to reload the config and restart the host software.  
Printer is halted

Shared TMC uarts need unique address or select\_pins polarity

Once the underlying issue is corrected, use the “RESTART”  
command to reload the config and restart the host software.  
Printer is halted

Shared TMC uarts need unique address or select\_pins polarity

Once the underlying issue is corrected, use the “RESTART”  
command to reload the config and restart the host software.  
Printer is halted

Shared TMC uarts need unique address or select\_pins polarity

Once the underlying issue is corrected, use the “RESTART”  
command to reload the config and restart the host software.  
Printer is halted

Shared TMC uarts need unique address or select\_pins polarity

Once the underlying issue is corrected, use the “RESTART”  
command to reload the config and restart the host software.  
Printer is halted

Shared TMC uarts need unique address or select\_pins polarity

Once the underlying issue is corrected, use the “RESTART”  
command to reload the config and restart the host software.  
Printer is halted

Shared TMC uarts need unique address or select\_pins polarity

Once the underlying issue is corrected, use the “RESTART”  
command to reload the config and restart the host software.  
Printer is halted

Starting Klippy…  
Args: [‘/home/pi/klipper/klippy/klippy.py’, ‘/home/pi/printer.cfg’, ‘-l’, ‘/tmp/klippy.log’]  
Git version: ‘v0.10.0-546-ga709ba43’  
CPU: 4 core ARMv7 Processor rev 3 (v7l)  
Python: ‘2.7.16 (default, Oct 10 2019, 22:02:15) \n[GCC 8.3.0]’  
Start printer at Mon Aug 29 16:51:23 2022 (1661788283.9 67814.2)  
===== Config file =====  
[stepper\_x]  
step\_pin = PC15  
dir\_pin = PF0  
enable\_pin = !PF1  
microsteps = 16  
rotation\_distance = 40  
endstop\_pin = ^!PF2  
position\_endstop = 0  
position\_max = 500  
homing\_speed = 50

[stepper\_y]  
step\_pin = PE3  
dir\_pin = PE2  
enable\_pin = !PE4  
microsteps = 16  
rotation\_distance = 40  
endstop\_pin = ^!PC13  
position\_endstop = 0  
position\_max = 500  
homing\_speed = 50

[stepper\_z]  
step\_pin = PB8  
dir\_pin = PB7  
enable\_pin = !PB9  
microsteps = 16  
rotation\_distance = 8  
endstop\_pin = ^!PE0  
position\_endstop = 0  
position\_max = 500  
homing\_speed = 12  
second\_homing\_speed = 1

[stepper\_z1]  
step\_pin = PG12  
dir\_pin = PG11  
enable\_pin = !PG13  
microsteps = 16  
rotation\_distance = 8  
endstop\_pin = ^!PH6

[stepper\_z2]  
step\_pin = PD6  
dir\_pin = PD5  
enable\_pin = !PD7  
microsteps = 16  
rotation\_distance = 8  
endstop\_pin = ^!PG14

[stepper\_z3]  
step\_pin = PD1  
dir\_pin = PD0  
enable\_pin = !PD2  
microsteps = 4  
rotation\_distance = 8  
endstop\_pin = ^!PG9

[extruder\_stepper share\_stepper]  
extruder =  
step\_pin = PF3  
dir\_pin = !PG3  
enable\_pin = !PF8  
microsteps = 16  
rotation\_distance = 15.84  
gear\_ratio = 5:1

[extruder]  
nozzle\_diameter = 0.400  
filament\_diameter = 1.750  
heater\_pin = PB1  
sensor\_pin = PC1  
sensor\_type = EPCOS 100K B57560G104F  
min\_temp = 0  
max\_temp = 290  
min\_extrude\_temp = 10  
max\_extrude\_only\_distance = 500000  
control = pid  
pid\_kp = 18.622  
pid\_ki = 0.479  
pid\_kd = 180.863

[extruder1]  
nozzle\_diameter = 0.400  
filament\_diameter = 1.750  
heater\_pin = PA1  
sensor\_pin = PC2  
sensor\_type = EPCOS 100K B57560G104F  
control = pid  
pid\_kp = 22.2  
pid\_ki = 1.08  
pid\_kd = 114  
min\_temp = 0  
max\_temp = 290  
min\_extrude\_temp = 10  
max\_extrude\_only\_distance = 50000

[heater\_bed]  
heater\_pin = PA2  
sensor\_pin = PC0  
sensor\_type = ATC Semitec 104GT-2  
control = watermark  
min\_temp = 0  
max\_temp = 130

[fan]  
pin = PE5

[heater\_fan fan1]  
pin = PE6

[temperature\_sensor mcu\_temp]  
sensor\_type = temperature\_mcu

[mcu]  
restart\_method = command  
serial = dev/serial/by-id/usb-Klipper\_stm32f407xx\_2D0039000647303036313935-if00  
baud = 250000

[printer]  
kinematics = corexy  
max\_velocity = 10000  
max\_accel = 3000  
max\_z\_velocity = 25  
max\_z\_accel = 30

[servo Test\_servo]  
pin = PB11  
maximum\_servo\_angle = 180  
minimum\_pulse\_width = 0.0005  
maximum\_pulse\_width = 0.0025  
initial\_angle = 160

[probe]  
pin = ^!PH11  
deactivate\_on\_each\_sample = True  
x\_offset = 0.0  
y\_offset = 0.0  
z\_offset = 2  
speed = 5.0  
samples = 2  
sample\_retract\_dist = 2.0  
lift\_speed = 10  
samples\_tolerance = 0.100  
samples\_tolerance\_retries = 5  
activate\_gcode = SET\_SERVO SERVO=Test\_servo ANGLE=160  
deactivate\_gcode = SET\_SERVO SERVO=Test\_servo ANGLE=0

[tmc2208 stepper\_z]  
uart\_pin = PB5  
run\_current = 0.650  
stealthchop\_threshold = 999999

[tmc2208 stepper\_z1]  
uart\_pin = PG10  
run\_current = 0.650  
stealthchop\_threshold = 999999

[tmc2208 stepper\_z2]  
uart\_pin = PD4  
run\_current = 0.650  
stealthchop\_threshold = 999999

[tmc2208 stepper\_z3]  
uart\_pin = PC12  
run\_current = 0.650  
stealthchop\_threshold = 999999

[tmc2208 share\_stepper]  
uart\_pin = PG4  
run\_current = 0.650  
stealthchop\_threshold = 999999

[tmc5160 stepper\_x]  
cs\_pin = PC14  
sense\_resistor = 0.075  
run\_current = 1  
stealthchop\_threshold = 0  
spi\_software\_mosi\_pin = PG15  
spi\_software\_miso\_pin = PB6  
spi\_software\_sclk\_pin = PB3

[tmc5160 stepper\_y]  
cs\_pin = PE1  
sense\_resistor = 0.075  
run\_current = 1  
stealthchop\_threshold = 0  
spi\_software\_mosi\_pin = PG15  
spi\_software\_miso\_pin = PB6  
spi\_software\_sclk\_pin = PB3

[board\_pins]  
aliases =  
EXP1\_1=PC11, EXP1\_3=PC10, EXP1\_5=PG8, EXP1\_7=PG6, EXP1\_9=,  
EXP1\_2=PA15, EXP1\_4=PA8, EXP1\_6=PG7, EXP1\_8=PG5, EXP1\_10=\<5V\>,  
EXP2\_1=PB14, EXP2\_3=PD10, EXP2\_5=PH10, EXP2\_7=PB10, EXP2\_9=,  
EXP2\_2=PB13, EXP2\_4=PB12, EXP2\_6=PB15, EXP2\_8=, EXP2\_10=

[gcode\_macro T0]  
description = switch to T0  
gcode =  
ACTIVATE\_EXTRUDER EXTRUDER=extruder  
SYNC\_EXTRUDER\_MOTION EXTRUDER=share\_stepper MOTION\_QUEUE=extruder

[gcode\_macro T1]  
description = switch to T1  
gcode =  
ACTIVATE\_EXTRUDER EXTRUDER=extruder1  
SYNC\_EXTRUDER\_MOTION EXTRUDER=share\_stepper MOTION\_QUEUE=extruder1

# [gcode\_macro t\_offset] description = set gcode offset to current tool head gcode = SET\_GCODE\_OFFSET

Config error  
Traceback (most recent call last):  
File “/home/pi/klipper/klippy/klippy.py”, line 175, in \_connect  
self.\_read\_config()  
File “/home/pi/klipper/klippy/klippy.py”, line 141, in \_read\_config  
self.load\_object(config, section\_config.get\_name(), None)  
File “/home/pi/klipper/klippy/klippy.py”, line 130, in load\_object  
self.objects[section] = init\_func(config.getsection(section))  
File “/home/pi/klipper/klippy/extras/tmc2208.py”, line 223, in load\_config\_prefix  
return TMC2208(config)  
File “/home/pi/klipper/klippy/extras/tmc2208.py”, line 193, in **init**  
cmdhelper = tmc.TMCCommandHelper(config, self.mcu\_tmc, current\_helper)  
File “/home/pi/klipper/klippy/extras/tmc.py”, line 234, in **init**  
TMCMicrostepHelper(config, mcu\_tmc)  
File “/home/pi/klipper/klippy/extras/tmc.py”, line 514, in TMCMicrostepHelper  
mres = ms\_config.getchoice(‘microsteps’, steps)  
File “/home/pi/klipper/klippy/configfile.py”, line 73, in getchoice  
c = self.getint(option, default, note\_valid=note\_valid)  
File “/home/pi/klipper/klippy/configfile.py”, line 62, in getint  
minval, maxval, note\_valid=note\_valid)  
File “/home/pi/klipper/klippy/configfile.py”, line 33, in \_get\_wrapper  
% (option, self.section))  
Error: Option ‘microsteps’ in section ‘share\_stepper’ must be specified  
Option ‘microsteps’ in section ‘share\_stepper’ must be specified

Once the underlying issue is corrected, use the “RESTART”  
command to reload the config and restart the host software.  
Printer is halted

Transition to shutdown state: Shutdown due to M112 command  
Reactor garbage collection: (67814.302204227, 0.0, 0.0)  
Option ‘microsteps’ in section ‘share\_stepper’ must be specified

Once the underlying issue is corrected, use the “RESTART”  
command to reload the config and restart the host software.  
Printer is halted

Option ‘microsteps’ in section ‘share\_stepper’ must be specified

Once the underlying issue is corrected, use the “RESTART”  
command to reload the config and restart the host software.  
Printer is halted

Option ‘microsteps’ in section ‘share\_stepper’ must be specified

Once the underlying issue is corrected, use the “RESTART”  
command to reload the config and restart the host software.  
Printer is halted

---

<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:** [August 29, 2022, 4:03pm UTC](https://klipper.discourse.group/t/tmc2208-setting-for-extruder-stepper/3991/2 "2022-08-29T16:03:14Z")

</div>

Hello @tphan !

Can you please put your code snippets into code braces **\</\>**?  
You find them in the top bar of the edit window.

Without them, spaces and other letters get lost and its difficult to find out what is maybe wrong Thank you very much.

---

<div class="post-metadata">

**Author:** ![tphan](https://avatars.discourse-cdn.com/v4/letter/t/ac8455/32.png) [@tphan](https://klipper.discourse.group/u/tphan)\
**Post date:** [August 29, 2022, 5:28pm UTC](https://klipper.discourse.group/t/tmc2208-setting-for-extruder-stepper/3991/3 "2022-08-29T17:28:48Z")

</div>

Ok thanks for reply. I actually have an enlighten moment and find out how to do it.

---

<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:** [August 31, 2022, 8:17pm UTC](https://klipper.discourse.group/t/tmc2208-setting-for-extruder-stepper/3991/4 "2022-08-31T20:17:31Z")

</div>

Replace `[tmc2208 share_stepper]` with `[tmc2208 extruder_stepper share_stepper]`

-Kevin

---

<div class="post-metadata">

**Author:** ![tphan](https://avatars.discourse-cdn.com/v4/letter/t/ac8455/32.png) [@tphan](https://klipper.discourse.group/u/tphan)\
**Post date:** [August 31, 2022, 9:36pm UTC](https://klipper.discourse.group/t/tmc2208-setting-for-extruder-stepper/3991/5 "2022-08-31T21:36:44Z")

</div>

That is exactly what I did . Thank You for confirming.  
Greatly appreciated.
